jaya7838: Can someone please give me some clues as to how I could retrieve the original value of SL in an open order after the SL has been moved to BE or beyond?
|
Does not exist, you must remember it.
EAs must be coded to recover. If the power fails, OS crashes, terminal or chart
is accidentally closed, on the next tick, any static/global ticket variables
will have been lost. You will have an open order but don't know it, so the EA
will never try to close it, trail SL, etc. How are you going to recover? Use a
OrderSelect loop to recover, or persistent storage (GV+flush
or files) of ticket
numbers required.
|
I guess I have to save the ticket number and the SL both in GVs. I am using this on a multiple pair terminal. Are GVs available in array form? Did some searching but couldn't find any info.
jaya7838: I guess I have to save the ticket number and the SL both in GVs. I am using this on a multiple pair terminal. Are GVs available in array form? Did some searching but couldn't find any info.
|
|
![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
Dear All,
Can someone please give me some clues as to how I could retrieve the original value of SL in an open order after the SL has been moved to BE or beyond?
Please note I am using MQL4 and not MQL5.
Thanks in advance,
Jaya