i want to create a EA, but i have the problem that sometimes my buy, sell or close trade is executed a bar later. I use ADX with period 10.
Here is a share of my fxdreema EA: https://fxdreema.com/shared/mfPjK64Sd
So to my problem. Here is a example: (ADX Baseline is yellow, DI+ is green, DI- is red)
The white arrow should mark the bars for buy and close. The buy action succeeded on the right bar, but the close is one bar to late. Why?
The sell order is correct. The second arrow should be the point for closing the trade, but after the fall of ADX the ADX is rising again, so the trade is not closing. The trade is not closing until two falling ADX bars. Why?
I appreciate your answers and thanks in advance.
Another example which show my problem more clear. I created a EA which should close the trade and open the opposite of the previous trade. So if we have a open buy it should close it and open a sell.
And as in the previous ADX EA this action(open and close trade) happens one bar after the change. Why is that so?
If you created the EA with "fxdreema" then please contact them instead on how to use their product or correct the issue.
If you had problems with Microsoft Word or Excel, would you contact the inventors of the languages of "C" or "C++", or would it be more correct to contact Microsoft support instead?
I will do this. Sorry.