Help in amibroker coding

Vertigo_1985

Well-Known Member
#1
Hi All,
i want to backtest a trading strategy but finding it difficult to code afl.
I want to buy 0.05 above the last candle high if certain conditions are met and 0.05 below the low of that candle will be the stop loss. So it should be like this :-
Buy = 0.05 above candle high if condition true
sell = 0.05 below candle low (stop loss)
sell = (candle high - candle low) + candle high (Target)

how to code this ?
 

Similar threads