Hi,
I'm new to AFL coding and have been trying to code some basic strategies. Could somebody help me with one issue? Below is a section of the code:
Buy1 = C > Buyband;
Sell1 = (C < Sellband);
ApplyStop(stopTypeLoss, stopModePercent, 11, ExitAtStop = 0, True, 0);
Buy = ExRem(Buy1, Sell1);
Sell = ExRem(Sell1, Buy1);
The Buyband and Sellband are Bbands. When I backtest, although the ApplyStop function does give me an exit it does not give me re-entry again unless and until the Sell is triggered. The re-entry bars have been set to 0 but the issue still persists.
Will really appreciate some support.
Many thanks.
I'm new to AFL coding and have been trying to code some basic strategies. Could somebody help me with one issue? Below is a section of the code:
Buy1 = C > Buyband;
Sell1 = (C < Sellband);
ApplyStop(stopTypeLoss, stopModePercent, 11, ExitAtStop = 0, True, 0);
Buy = ExRem(Buy1, Sell1);
Sell = ExRem(Sell1, Buy1);
The Buyband and Sellband are Bbands. When I backtest, although the ApplyStop function does give me an exit it does not give me re-entry again unless and until the Sell is triggered. The re-entry bars have been set to 0 but the issue still persists.
Will really appreciate some support.
Many thanks.