Is there a way to build a simple working strategy where the strategy waits X Bars (let’s say 3 bars) before it’s allowed to execute next entry?
I intended to use this way the BarsSinceExitExecution to do that as in the following logic:
{
If
(
my conditions are met
&& (BarsSinceExitExecution() == -1)
)
{Enterlong}
Else if
(
my conditions are met
&& (BarsSinceExitExecution() >=3)
)
&&(BarsSinceExitExecution() == -1)
{Enterlong}
}
However, it seems something wrong with it and it automatically disables my strategy. Is there anyway around it?
Another question: what’s the difference between (BarsSinceExitExecution) vs. (MarketPosition.long == MarketPosition.Flat)? I tried using it but the same results
Comment