![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 members,
how can i prevent a value from increasing or decreasing in Mql5?
The problem is, i want to calculate a "Stoploss" size that wont change even after modifying the SL price
Or
If there is a way to access the Initial Stoploss price because apparently HistoryOrderGetDouble(ticket,ORDER_SL) keep returning 0.
it will be very appreciated if this problem can be solved or if there is a work around of this problem because i have been on this for a while. Thanks in advance.
Post your code
Search here for trailing EA and then choose CodeBase or Articles for a deeper insight: https://www.mql5.com/en/search#!keyword=trailing%20ea.
The results are mixing MT4 and MT5, select what you need.
Carl Schreiber #:
Search here for trailing EA and then choose CodeBase or Articles for a deeper insight: https://www.mql5.com/en/search#!keyword=trailing%20ea.
The results are mixing MT4 and MT5, select what you need.
Thanks for your time and effort Carl Schreiber:
My goal is to use SL size/points which is not hard coded as reference for trailing the SL price.
That means i should be able to make reference to the Initial SL at any time of the open position
but i am yet to see anything of that sort on the forum, articles and code base.
Post your code
Search here for trailing EA and then choose CodeBase or Articles for a deeper insight: https://www.mql5.com/en/search#!keyword=trailing%20ea.
The results are mixing MT4 and MT5, select what you need.
Post your code
Here is the code, HistoryOrderGetDouble(ticket,ORDER_SL) keeps returning 0