Input: LMult(1.2), SMult(1.8);
{ Entry Orders }
Buy at Open next bar + Average(Range,4) * LMult Stop;
Sell at Open next bar - Average(Range,4) * SMult Stop;
{ Exit at first Profitable Open }
If MarketPosition = 1 and Open next bar > EntryPrice then
ExitLong
("Long Profit")next bar at Open;
If MarketPosition = -1 and Open next bar < EntryPrice then
ExitShort
("Short Profit") next bar at Open;
Please
translate the above to AFL.
THX