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