Hi Traders,
Good day,
I have a problem with coding my EA. It is based on this equation:
You can notice from the picture above that the EA is skipping some positions and I have no idea why.
The idea is simple, I want the EA to compare the high for yesterday and the day before i.e. High[1] and High[2] and the low as well i.e. Low[1] and Low[2]
Then use this condition below to place positions i.e. SellStop and BuyStop on Yesterday's high and low.
If the condition is not met, the EA should return to zero.
there is something weird about this equation, when I used this equation below, it doesn't work and no positions are placed.
[/php]Does any pro coder here know how to solve this problem, please?
I guess it is a matter of re-counting bars or when new bar show up there is some sort of recounting bars or something like this.
Please kindly let me know whenever it is possible.
Best wishes,
Scarface9
Good day,
I have a problem with coding my EA. It is based on this equation:
You can notice from the picture above that the EA is skipping some positions and I have no idea why.
The idea is simple, I want the EA to compare the high for yesterday and the day before i.e. High[1] and High[2] and the low as well i.e. Low[1] and Low[2]
Then use this condition below to place positions i.e. SellStop and BuyStop on Yesterday's high and low.
If the condition is not met, the EA should return to zero.
there is something weird about this equation, when I used this equation below, it doesn't work and no positions are placed.
[/php]Does any pro coder here know how to solve this problem, please?
I guess it is a matter of re-counting bars or when new bar show up there is some sort of recounting bars or something like this.
Please kindly let me know whenever it is possible.
Best wishes,
Scarface9