Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

3sma - expert for MetaTrader 5

Published by:
Vladimir Karputov
Views:
5972
Rating:
(24)
Published:
2018.08.23 13:17
3sma.mq5 (30.53 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The author of the idea: Scriptor

MQL5 code author: barabashkakvn

The EA is based on three iMA (Moving Average, MA) indicators using the MODE_SMA averaging method (Simple averaging). It works on every tick.


Signal for opening a BUY position

"MA 1", "MA 2" and "MA 3" indicator values are taken from the bar #0.

"MA 1" is above "MA 2" by MA's spread points, while "MA 2" indicator is above "MA 3" by MA's spread points:

3sma


Signal for opening a SELL position

"MA 1", "MA 2" and "MA 3" indicator values are taken from the bar #0.

"MA 1" indicator is below "MA 2" by MA's spread points, while "MA 2" is below "MA 3" by MA's spread points.


Limitations for position opening

If at the moment, there are BUY positions opened by this EA, then the BUY signal is ignored. The same is done with the SELL signal.


Closing Positions

"MA 1" and "MA 2" indicator values are taken from the bar #0.

  • If "MA 1" is less than "MA 2" for the half of MA's spread → close BUY position;
  • If "MA 1" is above "MA 2" for the half of MA's spread → close SEll position.

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/21495

CenterOfGravityCandle_HTF CenterOfGravityCandle_HTF

The CenterOfGravityCandle indicator with the timeframe selection option available in the input parameters.

CandleStop_System_HTF CandleStop_System_HTF

CandleStop_System indicator with the timeframe selection option available in the input parameters.

Chaikin_Volatility_Histogram Chaikin_Volatility_Histogram

Chaikin volatility indicator as a colored histogram.

One MA EA One MA EA

The EA based on single iMA (Moving Average, MA) indicator signals.