Wednesday, March 30

AFL for AmiBroker

A very powerful Buy and Sale afl, please have a look at this afl:


You should paste following code in your AmiBroker custom afl section and check its performance.

Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

 // trade on next bar open
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = SellPrice = Open;

 // trade size: 25% of current portfolio equity
SetPositionSize( 25, spsPercentOfEquity );

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More