Simple Moving Average (SMA) – Simple yet powerfull indicator for MetaTrader4 (MT4)

GPS Forex Robot
Indicators are very powerful in MT4 expert advisor (EA) to predict trends and useful if it is set in a correct way. One of the popular indicator often used in programming EA using the Editor is SMA.

Using SMA have a few configuration. In order to provide the date to superimpose this indicator onto a currency chart, it will requires 3 inputs.

1) Periods - this will tell the indicator to take the number of historical bars (depending on your chart time frame) to calculate the average value.

2) OHLC - Open, High, Low or Close. You have to choose one to be the value to calculate. Different OHLC will yield different trends from this indicator

3) Methods - Usually is simple method to calculate which weights the number of periods equally when getting the average. Some uses exponential which will put more weight-age on recent history bars then older historical bars.







Attached a SMA (24 periods, Close, Simple) on a EURCHF chart on 1 Hour time fame. The SMA is in red colour and you can clearly see a downward trend from 16 Dec to 22 Dec. The red line is above the currency bar 90% of the time.

In order to use this SMA, you can program it to compare with the current currency EURCHF value. If consecutive 6 hours (6 bars) the currency close value is lower then SMA value. And the SMA value between SMA previous value is >20 pips (gradient over 6 hours). This will show that it is a srong down trend and a sell order can be executed.

Likewise between 23 Dec to 27 Dec, SMA (red line) is lower then the OHLC currency bar. This will show that there is a strong uptrend and for consecutive 6 hours, SMA value is lower and gradient over 6 hours is more then 20 pips, a Buy order can be issued.

For the Take profit setting would be 60 pips as the gradient is >20pips over 6 hours and assuming the trend will last for another 12 hours or more. And the stoploss would be 60 pips as well, but be careful as you can see the retraction on 21 Dec is as high as 80 pips which could stoploss the trade before you can hit take profit. So for the stoploss you may want to set it at 100pips and set a higher profit take at 160pips or 200 pips as you can see the trend is strong from 20 Dec to 21 Dec.


No comments:

Post a Comment

Top Forex Automated Trading Expert Advisor (EA)


Forex EAROI (Monthly)Profit FactorMax Draw DownS3 ScoresStar RatingAlexa.com
FAP Turbo207%31.770.32%280 points5 starsRank 31,123
GPS Forex Robot28%3.935.68%260 points4 starsRank 283,290
Forex MegaDroid19.8%NANA250 points4 starsRank 72,310
Leo Trader Pro32%2.855.84%250 points4 starsRank 213,570

Fully editable *.mq4 files that compile successfully with no errors (3MB zip file with 200+ EA codes. Including 40+ strategies from the Strategy Book. You can download the Free Strategy Book by joining my email newsletter on the right side of this website. Click "Buy Now" to make payment and instant down the Best Forex Ranking Cook Book at USD $79 (One time payment only) Click here for more info

Please inform me if unable to purchase or download (send to sngerge@gmail.com)