I've been struggling to solve this. Based on what I saw I should use OrderSelect() but have been unsuccessful. See "SL" and "TP" below. SL works everytime because it is set to the low of the previous candle, however I'm trying to base the TP off of the SL to have the Risk:Reward ratio of my liking (1:2 currently).
Can someone more experienced point me in the right direction?
I used an EAbuilder but it doesn't have everything I want/need (like ObjectGetDouble) so I've been trying to learn a little coding. This is my first real challenge that I've been struggling to get through.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can someone more experienced point me in the right direction?
I used an EAbuilder but it doesn't have everything I want/need (like ObjectGetDouble) so I've been trying to learn a little coding. This is my first real challenge that I've been struggling to get through.