Hi all, I’ve tried to create EA based on ichimoku indi. I want to use the chikou Span (the lagging price line) as take profit. The idea is when the chikou span touches the bar then close the order.
I know that this is wrong because the take profit wouldn’t be trigger at all, it is happened because the chikou span line is shifted 26 bars and not on the current bar. What I want is when the chikou span that is shifted 26 bars hit the bar than EA will close the trade at the current bar. Anyone has the logic how to do that?
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.
My code for the take profit is like this:
I know that this is wrong because the take profit wouldn’t be trigger at all, it is happened because the chikou span line is shifted 26 bars and not on the current bar. What I want is when the chikou span that is shifted 26 bars hit the bar than EA will close the trade at the current bar. Anyone has the logic how to do that?