ernest02:
You have to use OnChartEvent handler with CHARTEVENT_OBJECT_DRAG event.I am writing an EA where I draw a horizontal line at a specific price level. This is similar to placing a S/L or T/P in MT4 where a line is drawn at the specific level or dragged from the transaction line to the specific price level. In MT4 you can also drag the existing line to a new position and the value of the S/L or T/P is automatically updated.
How can we do this dragging of the line with automated update of the new position in MQL4? I have searched and searched and cannot find any code examples of this function.
Can anybody perhaps help?
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
I am writing an EA where I draw a horizontal line at a specific price level. This is similar to placing a S/L or T/P in MT4 where a line is drawn at the specific level or dragged from the transaction line to the specific price level. In MT4 you can also drag the existing line to a new position and the value of the S/L or T/P is automatically updated.
How can we do this dragging of the line with automated update of the new position in MQL4? I have searched and searched and cannot find any code examples of this function.
Can anybody perhaps help?