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.
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