Hi,
I have created an EA based on a Pivot Reversal strategy.
It has 4 rules before the EA needs to open a trade:
1: I'm looking at the bar 1 until 9 if this is all good I set a variable on true.
2: The lower low or highest high of a bar will be saved in a variable.
3: When this is done the EA needs to open a SHORT or a LONG when the current price has crossed the variable saved in rule 2.
4: Reset the variables
Now comes the problem until rule 2 everything goes fine, but when the EA wants to open a trade it opens the trade at the opening of a new bar. But at that point the price never crossed the lowest low or highest high that is been saved at rule 2.
I hope somebody can help me with this.
I have created an EA based on a Pivot Reversal strategy.
It has 4 rules before the EA needs to open a trade:
1: I'm looking at the bar 1 until 9 if this is all good I set a variable on true.
2: The lower low or highest high of a bar will be saved in a variable.
3: When this is done the EA needs to open a SHORT or a LONG when the current price has crossed the variable saved in rule 2.
4: Reset the variables
Now comes the problem until rule 2 everything goes fine, but when the EA wants to open a trade it opens the trade at the opening of a new bar. But at that point the price never crossed the lowest low or highest high that is been saved at rule 2.
I hope somebody can help me with this.