[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Trading at the Open: DeGapping price arrays



PureBytes Links

Trading Reference Links




In EOD 
(assume you use EOD) the profit stop cannot be use at the same time as the Stop 
loss stop. How would you know which came first?
<FONT face=Arial color=#0000ff 
size=2> 
Also, 
what settings did you use? I don't see any SetOptions() in your 
code...
<FONT face=Arial color=#0000ff 
size=2> 
Your 
Stops also appear very small, try setting commissions to 1ct/share - or whatever 
your vroker charges.
<FONT face=Arial color=#0000ff 
size=2> 
best 
regards,
<FONT face=Arial color=#0000ff 
size=2>herman.

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Louw-Roux Coetzer 
  [mailto:lcoetzer@xxxxxxxxxxxx]Sent: Tuesday, July 06, 2004 12:56 
  PMTo: AmiBroker ForumSubject: [amibroker] This can't be 
  true, please help !!!
  Hi there all !
   
  Could somebody please confirm the following code 
  for acuracy, the results seem a bit to good to be true... the problem relates 
  to my previouse mail " Please Confirm this".
   
  Here is the 
  code:
   
  targetpoints = <FONT 
  color=#0000ff>Param("Target Profit",<FONT 
  color=#ff00ff>0.0050,0.0005,<FONT 
  color=#ff00ff>1,0.0001); <FONT 
  color=#008000 size=1>// profit target 
  
  SL = <FONT 
  color=#0000ff>Param("Stop Loss",<FONT 
  color=#ff00ff>0.01,0.0005,<FONT 
  color=#ff00ff>1,0.0001); <FONT color=#008000 
  size=1>// Stop Loss Level.
  TickSize=<FONT 
  color=#ff00ff>0.000<FONT 
  color=#ff00ff>1;
  NumContracts = <FONT 
  color=#ff00ff>5;PointValue =100<FONT 
  color=#ff00ff>00;PositionSize = NumContracts * 
  MarginDeposit;<FONT face=Arial 
  color=#008000 size=1>
  <FONT color=#000000 
  size=2>//=============================================================================<FONT 
  size=1>
  reEntryDelay = <FONT 
  color=#0000ff>Param("Wait after first 
  signal",4,1,<FONT 
  color=#ff00ff>50,1);<FONT 
  size=1>
  triggerTime =<FONT 
  color=#0000ff>Param("<FONT 
  color=#ff00ff>Trigger Time after Break-out<FONT 
  color=#ff00ff>",20,<FONT 
  color=#ff00ff>1,50,<FONT 
  color=#ff00ff>1);
  Lreq1 = <FONT 
  color=#0000ff>BarsSince(H><FONT 
  color=#0000ff>BBandTop(C,21,<FONT 
  color=#ff00ff>2)) < triggertime;
  Sreq1 = <FONT 
  color=#0000ff>BarsSince(L><FONT 
  color=#0000ff>BBandBot(C,21,<FONT 
  color=#ff00ff>2)) < triggertime;<FONT 
  size=1>
  Lreq2 = <FONT 
  color=#0000ff>Cross(EMA(C,<FONT 
  color=#ff00ff>62),C);
  Sreq2 = <FONT 
  color=#0000ff>Cross(C,<FONT 
  color=#0000ff>EMA(C,<FONT 
color=#ff00ff>62));
  BuyPrice = <FONT 
  color=#0000ff>ValueWhen(Lreq2,C);
  ShortPrice = <FONT 
  color=#0000ff>ValueWhen(Sreq2,C);<FONT 
  size=1>
  Short = Lreq1 AND Lreq2;
  Buy = sreq1 AND sreq2;<FONT 
  size=1>
  Sell = <FONT 
  color=#0000ff>TimeNum()==170000<FONT 
  face=Arial>;
  Cover = <FONT 
  face=Arial>TimeNum()==<FONT 
  color=#ff00ff>170000<FONT 
  size=2>; 
  ApplyStop<FONT 
  size=2>( stopTypeProfit, stopModePoint, 
  targetpoints, True<FONT 
  face=Arial>,False,reEntrydelay<FONT 
  size=2> ); 
  ApplyStop<FONT 
  size=1>( stopTypeLoss, 
  stopModePoint, SL, True ); 
   
  It basically looks for a break above 
  or below the upper or lower Bollinger Bands.  Once a breach has been 
  detected, it waits for a reversal that crosses the 62 EMA into the opposite 
  direction of the break-out.  It would then enter a trade into the 
  particular direction.  This is based on the EUR/USD forex pair. 
  
   
  The following results were obtained 
  with the target profit set to 55 points and the stoploss to 
  100.
   
  Wait until you see the equity curve !!!  
  There must be something not right here, please help...
   
  Kind regards and thanks in advance 
  !!!
   
  Louw Coetzer
  
  
  
   
  
  
    
    
      Statistics
  
    
    
       
      All trades
      Long trades
      Short trades
    
      Initial capital
      10000.00
      10000.00
      10000.00
    
      Ending capital
      79059.81
      51314.68
      37745.13
    
      Net Profit
      69059.81
      41314.68
      27745.13
    
      Net Profit %
      690.60 %
      413.15 %
      277.45 %
    
      <TH 
      title="Market exposure of the trading system calculated on bar by bar basis. Sum of bar exposures divided by number of bars. Single bar exposure is the value of open positions divided by portfolio equity.">Exposure 
        %
      0.15 %
      0.08 %
      0.07 %
    
      Net Risk Adjusted Return 
      %
      456729.52 %
      504416.08 %
      400367.84 %
    
      Annual Return %
      80.83 %
      59.77 %
      46.31 %
    
      Risk Adjusted Return 
      %
      53455.32 %
      72968.74 %
      66824.42 %
    
      
        
      
    
      All trades
      2132
      1113 (52.20 %)
      1019 (47.80 %)
    
      <TH 
        title="(Profit of winners + Loss of losers)/(number of trades)"> Avg. 
        Profit/Loss
      32.39
      37.12
      27.23
    
      <TH 
        title="(% Profit of winners + % Loss of losers)/(number of trades)"> Avg. 
        Profit/Loss %
      0.06 %
      0.07 %
      0.05 %
    
       Avg. Bars Held
      12.80
      15.94
      9.36
    
      
        
      
    
      Winners
      946 (44.37 %)
      500 (23.45 %)
      446 (20.92 %)
    
       Total Profit
      112044.78
      68479.65
      43565.13
    
       Avg. Profit
      118.44
      136.96
      97.68
    
       Avg. 
        Profit %
      0.21 %
      0.24 %
      0.17 %
    
       Avg. Bars Held
      17.56
      20.30
      14.49
    
       Max. Consecutive
      6
      6
      9
    
       Largest win
      4670.00
      4670.00
      280.00
    
       # bars in largest win
      41
      41
      25
    
      
        
      
    
      Losers
      1186 (55.63 %)
      613 (28.75 %)
      573 (26.88 %)
    
       Total Loss
      -42984.97
      -27164.97
      -15820.00
    
       Avg. Loss
      -36.24
      -44.31
      -27.61
    
       Avg. 
        Loss %
      -0.06 %
      -0.08 %
      -0.05 %
    
       Avg. Bars Held
      8.99
      12.39
      5.36
    
       Max. Consecutive
      8
      9
      10
    
       Largest loss
      -515.00
      -515.00
      -490.00
    
       # bars in largest loss
      42
      42
      5
    
      
        
      
    
      <TH 
      title="The largest peak to valley decline experienced in any single trade">Max. 
        trade drawdown
      -735.00
      -735.00
      -300.00
    
      <TH 
      title="The largest peak to valley percentage decline experienced in any single trade">Max. 
        trade % drawdown
      -1.30 %
      -1.30 %
      -0.51 %
    
      <TH 
      title="The largest peak to valley decline experienced in portfolio equity">Max. 
        system drawdown
      -809.99
      -1060.01
      -680.01
    
      <TH 
      title="The largest peak to valley percentage decline experienced in portfolio equity">Max. 
        system % drawdown
      -3.76 %
      -5.07 %
      -4.23 %
    
      Recovery 
Factor
      85.26
      38.98
      40.80
    
      <TH 
        title="Compound Annual % Return divided by Max. system % drawdown">CAR/MaxDD
      21.50
      11.78
      10.96
    
      <TH 
        title="Risk Adjusted Return divided by Max. system % drawdown">RAR/MaxDD
      14220.51
      14387.88
      15810.65
    
      Profit Factor
      2.61
      2.52
      2.75
    
      Payoff Ratio
      3.27
      3.09
      3.54
    
      <TH 
      title="Standard error measures chopiness of equity line. The lower the better.">Standard 
        Error
      1207.01
      1223.74
      561.46
    
      <TH 
      title="Measure of the relation between the risk inherent in a trading the system compared to its potential gain. Higher is better. Calculated as slope of equity line (expected annual return) divided by its standard error. ">Risk-Reward 
        Ratio
      15.78
      8.42
      15.56
    
      <TH 
      title="Square root of sum of squared drawdowns divided by number of bars">Ulcer 
        Index
      0.57
      1.05
      0.88
    
      Ulcer 
        Performance Index
      132.28
      51.88
      46.50
    
      <TH 
      title="Measure of risk adjusted return of investment. Above 1.0 is good, more than 2.0 is excellent.">Sharpe 
        Ratio of trades
      6.71
      5.58
      9.90
    
      K-Ratio
      15.90
      8.48
      15.68Check AmiBroker 
  web page at:<A 
  href="">http://www.amibroker.com/Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.