I have a multi time frame strategy on the same equity.
CalculateOnBarClose = true;
The primary [0] time frame is a 1 min and the second [1] is a 5 min.
I have a strategy running on the 5 min time frame. Let's call it "Y".
If Y is true --> Open a trade.
This strategy works fine and triggers trades on the correct bars.
I added a condition (lets call it "X") on the 1 min time frame.
The condition "X" simply states: if X is true, do Y.
As an example:
When running Y only (this is on the 5 min time frame), I get a trade trigger that, for instance, is initiated on the close of the 10:35am bar, which means the trade is executed on open of the following bar at 10:40am.
This is correct.
However when altering this strategy and adding:
if (BarsInProgress == 1)
If Y is true --> set someVariable = 1 (do not open a trade)
if (BarsInProgress == 0)
If X is true & someVariable == 1 --> open a trade.
What I'm noticing is that the Y trigger still takes place on the 10:35am bar.
However the trade is only executed on the open 1 min after, hence on the open of the 10:37am (1min time frame) bar.
Shouldn't this be triggered on the open of the 10:36am bar?
Why is there a 1 min lag?
Comment