Im trying to write a simple condition into an EA where the take profit will trigger if the Parabolic SAR reverses instead of reaching a specific pip count.
Brand new to this so Im not sure if this is possible.
Current basic code is below for the buy trade setup:
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.
Hey MQL5 team!
Im trying to write a simple condition into an EA where the take profit will trigger if the Parabolic SAR reverses instead of reaching a specific pip count.
Brand new to this so Im not sure if this is possible.
Current basic code is below for the buy trade setup:
if(LastSARValue < CurrentOpen)
{
trade.Buy( 0.1,_Symbol, Ask, (Ask-25*_Points), (LastSARValue > CurrentOpen),_Symbol);
}
Stop loss is set to 25 points and it enters the trade when the Parabolic SAR is below the open of a new candle which is what I want.
Thanks in advance for any help!