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

[amibroker] Re: Importing external signals



PureBytes Links

Trading Reference Links




Hello Herman !
 
No worries, you have helped me remember the darn 
fee charges or in this case the spread cost !!!
 

May I ask your opinion on something else though 
?
 
Is it possible for a certain strategy/system to be 
working extremely well say the last 150 days, but before then, it did almost not 
work.  In other words I am thinking that the 
market is almost susceptible to certain systems at different times, what works 
now might not be working in a year from now.
 
I ask this because  I have been testing many 
systems and found that quite a few I have come across work very well the past 
150 odd days, but checking back 1 or two year back, they all fail and then 
strangely what worked then also mostly does not work now...
 
You have been trading a lot and have probably done 
your own research also, so I hope that maybe you could give your opinion on 
this.
 
I trade the Forex market mostly and I know it is a 
very fast moving match, things change all the time, so should the trading 
approach I think ... or so I think !
 
Kind regards and happy trading !!!
 
Louw Coetzer
 



 
I did manage to get it right more or less...here is 
the complete code for the test ( there was one major signal test I left out - 
OOPS !)  Also optimized the Stop Loss, it eventually ended up being 
0.0091  close to the default 0.01,  the Rapport follows further down 
and includes the 5 point spread cost for each contract:
 
//============================================================================= 
targetpoints = Param("Target Profit",0.0050,0.0005,1,0.0001); // profit 
target  SL = Param("Stop Loss",0.01,0.0005,1,0.0001);  // Stop 
Loss Level. TickSize=0.0001; NumContracts = 5; PointValue =10000; 
PositionSize = NumContracts * MarginDeposit; 
//============================================================================= 
reEntryDelay = Param("Wait after first signal",4,1,50,1); triggerTime 
=Param("Trigger Time after Break-out",20,1,50,1); Lreq1 = 
BarsSince(H>BBandTop(C,21,2)) < triggertime; Sreq1 = 
BarsSince(L>BBandBot(C,21,2)) < triggertime; Lreq2 = 
Cross(EMA(C,62),C); Sreq2 = Cross(C,EMA(C,62)); BuyPrice = 
ValueWhen(Lreq2,C); ShortPrice = ValueWhen(Sreq2,C); Short = Lreq1 AND 
Lreq2 AND  C- EMA(C,200) > 0.0010; Buy = sreq1 AND sreq2 AND 
EMA(C,200)-C > 0.0010 ; ExRemSpan(Buy,10); ExRemSpan(Short,10); 
Sell = TimeNum()==170000; Cover = TimeNum()==170000;  
ApplyStop( stopTypeProfit, stopModePoint, targetpoints, 
True,False,reEntrydelay );  ApplyStop( stopTypeLoss, stopModePoint, SL, 
True );  
 


  
  
    Statistics

  
  
     
    All trades
    Long trades
    Short trades
  
    Initial capital
    10000.00
    10000.00
    10000.00
  
    Ending capital
    16370.01
    15949.79
    10420.22
  
    Net Profit
    6370.01
    5949.79
    420.22
  
    Net Profit %
    63.70 %
    59.50 %
    4.20 %
  
    <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.23 %
    -0.06 %
    -0.17 %
  
    Net Risk Adjusted Return 
    %
    -27338.31 %
    -98185.79 %
    -2437.35 %
  
    Annual Return %
    234.46 %
    213.82 %
    10.61 %
  
    Risk Adjusted Return 
%
    -100624.99 %
    -352855.37 %
    -6153.70 %
  
    
      
    
  
    All trades
    85
    45 (52.94 %)
    40 (47.06 %)
  
    <TH 
      title="(Profit of winners + Loss of losers)/(number of trades)"> Avg. 
      Profit/Loss
    74.94
    132.22
    10.51
  
    <TH 
      title="(% Profit of winners + % Loss of losers)/(number of trades)"> Avg. 
      Profit/Loss %
    0.06 %
    0.11 %
    0.01 %
  
     Avg. Bars Held
    28.61
    21.96
    36.10
  
    
      
    
  
    Winners
    79 (92.94 %)
    44 (51.76 %)
    35 (41.18 %)
  
     Total Profit
    12160.00
    6909.80
    5250.21
  
     Avg. Profit
    153.92
    157.04
    150.01
  
     Avg. 
      Profit %
    0.13 %
    0.13 %
    0.12 %
  
     Avg. Bars Held
    21.46
    18.18
    25.57
  
     Max. Consecutive
    19
    22
    12
  
     Largest win
    169.99
    169.99
    150.01
  
     # bars in largest win
    13
    13
    2
  
    
      
    
  
    Losers
    6 (7.06 %)
    1 (1.18 %)
    5 (5.88 %)
  
     Total Loss
    -5789.99
    -960.01
    -4829.99
  
     Avg. Loss
    -965.00
    -960.01
    -966.00
  
     Avg. Loss 
    %
    -0.79 %
    -0.79 %
    -0.79 %
  
     Avg. Bars Held
    122.83
    188.00
    109.80
  
     Max. Consecutive
    1
    1
    1
  
     Largest loss
    -970.00
    -960.01
    -970.00
  
     # bars in largest loss
    71
    188
    71
  
    
      
    
  
    <TH 
    title="The largest peak to valley decline experienced in any single trade">Max. 
      trade drawdown
    -970.01
    -970.01
    -969.99
  
    <TH 
    title="The largest peak to valley percentage decline experienced in any single trade">Max. 
      trade % drawdown
    -0.80 %
    -0.80 %
    -0.76 %
  
    <TH 
    title="The largest peak to valley decline experienced in portfolio equity">Max. 
      system drawdown
    -1979.98
    -1780.00
    -1919.92
  
    <TH 
    title="The largest peak to valley percentage decline experienced in portfolio equity">Max. 
      system % drawdown
    -16.22 %
    -13.16 %
    -18.99 %
  
    Recovery Factor
    3.22
    3.34
    0.22
  
    <TH 
      title="Compound Annual % Return divided by Max. system % drawdown">CAR/MaxDD
    14.45
    16.25
    0.56
  
    <TH 
      title="Risk Adjusted Return divided by Max. system % drawdown">RAR/MaxDD
    -6203.27
    -26820.73
    -324.04
  
    Profit Factor
    2.10
    7.20
    1.09
  
    Payoff Ratio
    0.16
    0.16
    0.16
  
    <TH 
    title="Standard error measures chopiness of equity line. The lower the better.">Standard 
      Error
    461.23
    386.18
    376.58
  
    <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
    30.50
    38.44
    -2.06
  
    <TH 
    title="Square root of sum of squared drawdowns divided by number of bars">Ulcer 
      Index
    3.80
    1.42
    7.50
  
    Ulcer 
      Performance Index
    60.33
    146.57
    0.69
  
    <TH 
    title="Measure of risk adjusted return of investment. Above 1.0 is good, more than 2.0 is excellent.">Sharpe 
      Ratio of trades
    7.68
    27.22
    0.73
  
    K-Ratio
    3.59
    4.53
    -0.24
 
Above is also the result of the test, as you 
can see not many trades but high accuary and all....
 


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.