Forex Video-Course – TMA Bands Strategy in EA MT4 MPGO

PARAMETERS of TMA bands strategy in Forex Robot MPGO:

TMA bands very popular indicator. We found that our clients like to use it a lot and build different manual scalping and intraday forex strategies around this TMA bands indicator. In 2020 we started code and develop this beautiful strategies, we code one and double time frames indicator types in TMA signal function of EA MPGO. Thanks to your feedbacks and ideas too. Today EA MPGOv3.2.5 includes over 15 different types of TMA strategies for long term trading and intraday traders in Total Automated and Semi-Automated modes. Our clients sent us lots of interesting ideas how to use this indicator in forex robot, we have filtered ideas and selected the best ones to insert into the robot’s algorithm.

In latest version of EA MPGOv3.2.5 we totally recoded logic of TMA bands indicator entries comparing with previous versions

photo 2021 07 08 19 42 48
Picture: Expert advisor MPGOv3.2.5 with Double TF TMA Bands Strategy

In this video-course we will discuss all parameters of TMA indicator and strategies we have coded into forex robot EA MPGOv3.2.5 and will record video-examples how to use Debug Function in your robot to make sure signals works correct and user understand which TF to use in trading with correct values.

Screenshot at Jan 12 13 09 01
Video-Course Best TMA Bands Strategy EA MPGO 21

TypeTMAFiltre=0 // What type of TMA Filter EA must use : (0=Off , 1 2 3 4 5 6 7 8 9 10 11 12  13 14 15 see description below with pictures)
TMA_initTF= 60 // 0=Current TF where EA attached at Chart; 1=M1; 5=M5 15=M15; 30=M30; 60=H1; 240=H4 1440=D1. TimeFrame where EA will read values of Slow and Fast TMA indicators. EA must be attached at same or faster TF. Better attach Robot at M1 and read > Higher TimeFrames from set without problems. In tester TF must be same as in set for TMA (otherwise you it will freeze your MT4)
All_Bars
= 5000 // How much bars robot must calculate in Slow and Fast TMA.

TMA_HalfLengthFast = 56; // FastTMA ind parameter
TMA_HalfLengthSlow = 224; // SlowTMA ind parameter
TMA_PriceFast = 0; // 0=PRICE_CLOSE ; 1=PRICE_OPEN; 2=PRICE_HIGH; 3=PRICE_LOW; 4=PRICE_MEDIAN (high+low)/2; 5=PRICE_TYPICAL(high+low+close)/3; 6=PRICE_WEIGHTED (high+low+close+close)/4)
TMA_PriceSlow = 0; // 0=PRICE_CLOSE ; 1=PRICE_OPEN; 2=PRICE_HIGH; 3=PRICE_LOW; 4=PRICE_MEDIAN (high+low)/2; 5=PRICE_TYPICAL(high+low+close)/3; 6=PRICE_WEIGHTED (high+low+close+close)/4)
TMA_ATRMultiplierFast = 2.0; // FastTMA ind parameter
TMA_ATRMultiplierSlow = 4.0; // SlowTMA ind parameter
TMA_ATRPeriodFast = 100; // FastTMA ind parameter
TMA_ATRPeriodSlow = 400; // SlowTMA ind parameter
TMA_InterpolateFast = true; // FastTMA ind parameter
TMA_InterpolateSlow = true; // SlowTMA ind parameter

NumberBars_NRP = 250 // how much last bars of the history EA will use in NonRepaint strategies using TMA_NRP.ex4 indicator.
KeepTMAxOpposite = true // this parameter will be used in TypeTMA1 and TypeTMA3 strategies to hold or keep signals until opposite direction signal
MA_TMA_period = 50 // moving average period
MA_TMA_Method = 0 // moving average method. 0=Simple; 1=Exponential; 2=Smoothed; 3=Linear-weighted
MA_TMA_Price = 0 // moving average price. 0=PRICE_CLOSE ; 1=PRICE_OPEN; 2=PRICE_HIGH; 3=PRICE_LOW; 4=PRICE_MEDIAN (high+low)/2; 5=PRICE_TYPICAL(high+low+close)/3; 6=PRICE_WEIGHTED (high+low+close+close)/4)


TMA bands strategy #1 ( TypeTMAFiltre = 1 )

TypeTMAFiltre=1 – EA use only one SlowTMA indicator parameters. If price go out SlowTMA Channel – EA will open order to expect price will back inside channel of SlowTMA (no signal inside Channel). Additionally if KeepTMAxOposite=true EA keep current signal until opposite signal using history crosses in cycles.
Sell at Current not closed yet Bar: Curent Price > SlowTMA upper band
Buy at Current not closed yet Bar: Current Price < SlowTMA lower band

If at current bar no signals and if parameter KeepTMAxOpposite = true EA will look at history and find xBar of last signal and keep trade this signal untill reverse:
Sell at xBar of history: xBar Closed Price > SlowTMA upper band at xBar
Buy at xBar of history: xBar Closed Price < SlowTMA lower band at xBar

Type TMA 1
Picture: TMA bands #1 strategy (TypeTMAFiltre=1) in Forex robot MPGOv3.2.5

TMA bands strategy #2 ( TypeTMAFiltre = 2 )

TypeTMAFiltre=2 – EA use one SlowTMA indicator parameters. If price go out the SlowTMA channel EA will open order to continue this trend – breakout signal (EA trade only outside SlowTMA Chanel as Breakout strategy. No signals inside TMA channel). Signal will start once previous bar will be closed outside TMA Bands. Strategy can be used at News with combination of SAR strategy indicator in set of EA.

Type TMA 2
Picture: TMA bands #2 strategy (TypeTMAFiltre=2) in Forex robot MPGOv3.2.5

TMA bands strategy #3 ( TypeTMAFiltre = 3 )

TypeTMAFiltre=3 – EA use one SlowTMA indicator parameters. If pre-previous bar closed higher UpperBandSlowTMA (go and closed outside channel) and PreviousBarClosed < UpperBandSlowTMA (Price back into TMA channel and close bar inside channel) – its SELL Signal. EA waiting till price move back into channel using 2 closed bars as Cross outside and inside TMA – EA open order to expect price will back inside SlowTMA channel (same direction signal as TypeTMAFiltre=1 but with using 2 bars closed prices).
EA not keep signal to opposite signal if KeepTMAxOposite=false.
If we use KeepTMAxOposite=true EA keep previous signal sell until it will not find opposite signal buy with same cross 2 bars conditions.

TMA3
Picture: TMA bands #3 strategy – (TypeTMAFiltre=3) in Forex robot MPGOv3.2.5

There good example when EA cannot find Buy signal at small bars with TypeTMA3 because they very little and their closes was same as TMA lower band – so EA will keep sell with KeepTMAxOposite=true:

photo 2021 11 17 17 41 20
Picture: TMA#3 – no buy Entries in trend – EA keep Sell Signal

TMA bands strategy #4 ( TypeTMAFiltre = 4 )

TypeTMAFiltre=4 – it is Double TMA channel strategy: EA use two indicators: FastTMA and SlowTMA.
Sell signal: once upper band of Fast TMA will be > than upper band of SlowTMA.
Buy signal: once lower band of FastTMA will be < than lower band of SlowTMA).
No signals inside SlowTMA. Yellow color is a Signal areas:

Type TMA 4
Picture: TMA bands #4 strategy – (TypeTMAFiltre=4) in Forex robot MPGOv3.2.5

TMA bands strategy #5 ( TypeTMAFiltre = 5 )

TypeTMAFiltre=5 – (One SlowTMA indicator strategy ) EA use Central line of SlowTMA and compare it with MA. If MA < SlowTMA_Cental_Line its a Buy Signal, if MA > SlowTMA_Cental_Line – its a Sell signal:

Type TMA 5
Picture: TMA bands #5 strategy – (TypeTMAFiltre=5) in Forex robot MPGOv3.2.5

TMA bands strategy #6 ( TypeTMAFiltre = 6 )

TypeTMAFiltre=6 – (One SlowTMA indicator strategy) EA compare Current Price with Upper and Lower band + additionally MA with Central Line of SlowTMA indicator. For SELL signal price must go outside upper band of SlowTMA and MA must be higher Central line of SlowTMA. For BUY price must go down outside lower band of SlowTMA and  MA must be lower Central line of SlowTMA:

Type TMA 6
Picture: TMA bands #6 strategy – (TypeTMAFiltre=6) in Forex robot MPGOv3.2.5

TMA bands strategy #7 ( TypeTMAFiltre = 7 )

TypeTMAFiltre=7 – (One SlowTMA indicator strategy) Sell signal between Upper and Central line of SlowTMA. Buy Signal between Lower and Central line of SlowTMA indicator. This method do not signal outside TMA bands! Yellow color is a signal areas. No signals outside TMA channel:

Type TMA 7
Picture: TMA bands #7 strategy – (TypeTMAFiltre=7) in Forex robot MPGOv3.2.5

TMA bands strategy #8 ( TypeTMAFiltre = 8 )

TypeTMAFiltre=8 – (Double TF indicator Strategy) same entry point as in DoubleTF TypeTMAfiltre=4 but it hold and Continue this Signal inside SlowTMA until TypeTMA=4 will not show opposite signal or will not repaint at history ! (indicator TMA.ex4 can repaint a little, but still its good indicator for Double TF strategies like this. You can also use NON-Repaint TMA_NRP.ex4 indicator (we included this indicator in robot license) that must be renamed in TMA.ex4 to use with TypeTMAFiltre=8). Yellow color is a start point of signal area that keep trading till opposite signal even robot started trading in center of big slow TMA channel.

Type TMA 8
Picture: TMA bands #8 strategy – (TypeTMAFiltre=8) in Forex robot MPGOv3.2.5

TMA bands strategy #9 ( TypeTMAFiltre = 9 )

TypeTMAFiltre=9 – (Double TF indicator Strategy) same entry point as DoubleTF TypeTMAfiltre=8 (it hold and Continue this Signal inside SlowTMA until will not show opposite signal ) but!  For Sell signal there must be 3 conditions same time: FastTMA_UperBand>SlowTMA_UperBand and Previous bar must be closed Higher (outside) 2 TMA channels (Price must go out from 2 TMA Chanels outside):

TMA9
Picture: TMA bands #9 strategy – (TypeTMAFiltre=9) in Forex robot MPGOv3.2.5

TMA bands strategy #10 ( TypeTMAFiltre = 10 )

TypeTMAFiltre=10 (Double TF indicator Strategy of TMA.ex4 + TMA_NRP.ex4) Central line of SlowTMA (TMA.ex4) will be compared with Central line of FastTMA (TMA_NRP.ex4) at last NumberBars_NRP bars and if their summary difference Sum(TMACentr-TMACentrNRP)n_NumberBars_NRP of pips will be in Minus = SELL Signal, if in Plus = BUY signal (TMA.ex4 and TMA_NRP.ex4 must be different in code).

You can use default – different periods at usual TMA (Slow) and TMA_NRP (Fast), it will look at H1 like this:

TMA TMA NRP
Picture: TMA bands #10 strategy – (TypeTMAFiltre=10) different periods TMA & TMA_NRP in Forex robot MPGOv3.2.5

You can use same periods, because indicators are different at visual with same parameters, it will look at H1 like this:

TMA10 same periods
Picture: Same parameters in TMA_NRP.ex4 + TMA.ex4. SELL signal If TMA_NRP>TMA at last NumberBars_NRP

TMA bands strategy #11 ( TypeTMAFiltre = 11 )

TypeTMAFiltre=11 – (Double TF indicator Strategy) Same as TypeTMAFiltre=8 but TypeTMAFiltre=11 keep signal only to Central Line of SlowTMA. EA compare CentralLine_SlowTMA at current bar with current price (comparing with TypeTMAFiltre=8 EA that keep signal up to opposite signal)

Screenshot at Nov 12 17 30 10.png
Picture: TMA bands #11 strategy – (TypeTMAFiltre=11) in Forex robot MPGOv3.2.5
TMA11
Picture: TMA11 use value of CentralLineSlowTMA at Current BAR

Example of TMA#11 when signal Sell finished at current bar because Current price < CentralLine_SlowTMA(at Current bar). Both values at Current Bar (!):


TMA bands strategy #12 ( TypeTMAFiltre = 12 )

TypeTMAFiltre=12 – (Double TF indicator Strategy) Same as TypeTMAFiltre=11 but use value of CentralLineTMASlow at signal Bar – when algorithm found TMA#8 Cross of Fast and Slow TMA bands. Robot keep signal till CentralLineSlowTMA value at last Crossed Bar of two TMA Fast and Slow:

TMA12
Picture: TMA12 use value of CentralLineSlowTMA at crossed BAR (fell the difference with TMA11)

TMA bands strategy #13 ( TypeTMAFiltre = 13 )

TypeTMAFiltre=13 – (One SlowTMA + MA + CurrentPrice) similar to TMA8 but EA will use MA instead of FastTMA.
For Sell signal: CurrentBidPrice > MA(0) > UpperBandsSlowTMA(0).
For Buy signal: CurrentAskPrice < MA(0) < UpperBandsSlowTMA(0).
Where 0 – means values at CurrentBar that not closed yet.
If KeepTMAxOpposite = true – EA keep current signal till opposite signal.
If KeepTMAxOpposite = false – signals only in red (sell) and blue (buy) zones as at picture.

TMA13
Picture: TMA13 (MA + SlowTMA)

TMA bands strategy #14 ( TypeTMAFiltre = 14 )

TypeTMAFiltre=14 – (One SlowTMA atPreClosedBar + MA at PreClosedBar + ClosedPriceOfPreBar) similar to TMA13 but EA will use all values at ClosedPreBar(-1)
For Sell signal: ClosedPriceOfPreBar > MA(-1) > UpperBandsSlowTMA(-1).
For Buy signal: ClosedPriceOfPreBar < MA(-1) < UpperBandsSlowTMA(-1).
Where 1 – means values at Previous Closed Bar.
If KeepTMAxOpposite = true – EA keep current signal till opposite signal.
If KeepTMAxOpposite = false – signals only in red (sell) and blue (buy) zones as at picture of TMA13.


TMA bands strategy #15 (TypeTMAFiltre = 15 )

TypeTMAFiltre=15 – Same as TypeTMAFiltre = 8 but additionally EA compare Current price with 2 channels of TMA (price must be outside 2 TMA channels):
Current Bar Sell Signal: Current Price > FastTMA > SlowTMA
Current Bar Buy Signal: SlowTMA > FastTMA > Current Price
Also if no current signal at Current Bar that yet not closed – EA look at history to search and keep and hold such signals until reverse at this XBar where three conditions same time:
History Cross Sell at found xBar: Closed Price of xBar > FastTMA at xBar > SlowTMA at xBar
History Cross Buy at found xBar: SlowTMA at xBar> FastTMA at xBar > Closed Price of xBar


TMA bands strategy #16 (TypeTMAFiltre = 16)

TypeTMAFiltre=16 – EA look at Central lines of SlowTMA and FastTMA to dedicate global trend at last 3 closed bars values without value at current bar that yet not closed.
Sell Trend at SlowTMA will be if: CentralLineTMASlow#3>CentralLineTMASlow#2>CentralLineTMASlow#1
Buy Trend at SlowTMA will be if: CentralLineTMASlow#3<CentralLineTMASlow#2<CentralLineTMASlow#1

Sell Trend at FastTMA will be if: CentralLineTMAFast#3>CentralLineTMAFast#2>CentralLineTMAFast#1
Buy Trend at FastTMA will be if: CentralLineTMAFast#3<CentralLineTMAFast#2<CentralLineTMAFast#1

If both indicators Central lines have same direction at last 3 closed bars in trend – EA open order.

Screenshot at Apr 02 22 05 03
Picture: Buy signal at TypeTMAFiltre=16: 3 last closed bars of CentralLineTMA values at both indicators have consistent rise and looks up

TMA bands strategy #17 (TypeTMAFiltre = 17)

TypeTMAFiltre=17 – Same as TypeTMAFiltre = 8 (EA search signal of TMA#8 strategy at current bars, if no signal – it look at history crosses of that strategy to continue trade that direction until reverse), but additionally look at CentralLineFastTMA to dedicate consistent trend at 3 last closed bars of CentralLineFastTMA values.

Screenshot at Apr 02 22 32 01
Picture: TypeTMAFiltre=17 Sell signal (TMA8 + 3 last Bars of FastTMACentralLine looks down)