![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Print the chart symbol along with the ticket number, and you will find it's being modified somewhere else.
You keep saying that but offer no proof. Your posted code can't do it because you are filtering by symbol.
I'm sorry Mr. Roeder i didn't mean to disappoint you. Here's proof that this Dow Jones trade inherited stop loss from a previously opened USDJPY position.
That images shows nothing but a SL of 107 was set on some order on some symbol. Means nothing; a missing times Point might do that.
William Roeder, you might be my savior, so I edited the code in order to make it counting down. It now looks like this! Thanks for your precious help.
Your program syntax on OrderModify is incorrect.
Not Ask or Bid, but OrderOpenPrice().
Your program syntax on OrderModify is incorrect.
Not Ask or Bid, but OrderOpenPrice().
Tried this one as well, but same result. Thanks anyway for the answer Mr. Roberto.
Try checking your function TrailingStopAdvanceSell() / TrailingStopAdvanceBuy(), if it is correct.
So this is my trailing stop function (TSAS as you called it). As you can see it has its own OrderSelect() loop. I made this as a bool in order to not let the other modifying functions alter the orders if the TrailingStopFunction has worked. What seems to be happening is that when the EA is unable to place the SL on a chart, it places the same SL on another chart, ignoring the screening conditions by Symbol and Magic Number.
And this seems happening even if each symbol has its own MAGICNUMBER, edited ad hoc with an extern int.