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

[amibroker] Backtest Futures



PureBytes Links

Trading Reference Links

Trying to do a backtest on a single symbol(futures contract) by
selecting 'apply to current symbol', but not getting any results. 
When I analyse using the scan function on the selected symbol I'm
getting buy and short signals. Even if I put in something like Buy = C
> Ref(C,-1) which should generate plenty of signals I'm getting no joy...
When I run my backtest across all futures contracts it works okay ??
  
Shown below the very simple code:
MarginDeposit = PositionSize = 1;
BCond1 = Ref(Outside(),-2) AND Ref(C,-1) < Ref(L,-2) AND O <
Ref(C,-1); //Outside Bar Buy
SCond1 = C > Ref(H,-1) AND Ref(C,-1) > Ref(C,-2) AND Ref(C,-2) >
Ref(C,-3); 
BCond2 = Ref(C,-1) < Ref(L,-2) AND H > Ref(H,-1); 
SCond2 = Ref(C,-1) > Ref(H,-2) AND L < Ref(L,-1); 

Buy = BCond1 OR BCond2;
Short = Scond1 OR SCond2;
Sell = 0; //Sell only on stop
Cover = 0; // Cover only on stop
ApplyStop(stopTypeLoss, stopModePoint, 35, 1); // Stop loss maximum 35
points
ApplyStop( stopTypeNBar, stopModeBars, 2 ); // Exit trade after 2 days 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/