Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | JS MA SAR Trades

The author of the idea: JS_Sergey

MQL5 code author: barabashkakvn

ZigZag, Parabolic Sar and two Moving Averages are applied.

BUY open signal

Zigzag Low 0 bottom should be higher than Zigzag Low 1 bottom, Moving Average Fast should be higher than Moving Average Slow, close price should exceed Parabolic Sar indicator: 

MetaTrader Experts, Indicators, Scripts and Libraries

BUY close signal

Moving Averages are not used here. Zigzag Low 0 bottom should be higher than Zigzag Low 1 bottom, while close price should be below Parabolic Sar indicator: 

MetaTrader Experts, Indicators, Scripts and Libraries

SELL open signal

Zigzag High 0 top should be lower than Zigzag High 1Moving Average Fast should be lower than Moving Average Slow, while close price should be below Parabolic Sar indicator.

SELL close signal

Moving Average are not used in a SELL close signal. Zigzag High 0 top should be lower than Zigzag High 1 top, while close price should be above Parabolic Sar indicator.

If we need to open and close positions by trading signals only within a certain working time interval, set the Use start and end hours flag to 'true', while use the Start hour and End hour parameters to set the working time interval.

EURUSD M15

MetaTrader Experts, Indicators, Scripts and Libraries

22024