Envelopes indicator Strategies in EA MPGO v3.2.5

This strategies we coded similar to TMA indicator strategies, but Envelopes indicator is not so much repaint as TMA and Envelopes is a standard Trend indicator inbuilt in MT4 and its faster in tester and optimisation

Envelopes indicator parameters in EA :

PARAMETRS Envelopes
TypeEnvelopesFiltre=1 // 0 – Off Envelopes indicator in EA. 1, 2, 3, …is ON – see description below in TypeEnvelopesFiltre with pictures
Envelopes_InitTF = 60; // 0-Current TF where EA installed (attached), 1-M1, 5-M5, 5-M15, 30-M30, 60-H1, 240-H4, 1440-D1. TF where EA read two different periods Envelopes indicators. EA must be installed at same or faster TF.
Envelopes_ma_periodFast = 14 // Averaging period for calculation of the main line.
Envelopes_ma_periodSlow = 56 // Averaging period for calculation of the main line.
Envelopes_ma_methodFast = 0 // 0 – Simple averaging, 1 – Exponential averaging, 2 – Smoothed averaging, 3 – Linear-weighted averaging
Envelopes_ma_methodSlow = 0 // 0 – Simple averaging, 1 – Exponential averaging, 2 – Smoothed averaging, 3 – Linear-weighted averaging
Envelopes_ma_shiftFast = 0 // MA shift. Indicator line offset relate to the chart by timeframe.
Envelopes_ma_shiftSlow = 0 // MA shift. Indicator line offset relate to the chart by timeframe.
Envelopes_applied_priceFast = 0 // Applied price. 0 – Close price, 1 – Open price, 2 – The maximum price for the period, 3 – The minimum price for the period, 4 – Median price, (high + low)/2, 5 – Typical price, (high + low + close)/3, 6 – Weighted close price, (high + low + close + close)/4
Envelopes_applied_priceSlow = 0 // Applied price. 0 – Close price, 1 – Open price, 2 – The maximum price for the period, 3 – The minimum price for the period, 4 – Median price, (high + low)/2, 5 – Typical price, (high + low + close)/3, 6 – Weighted close price, (high + low + close + close)/4
Envelopes_deviationFast = 0.1 // Percent deviation from the main line.
Envelopes_deviationSlow = 0.4 // Percent deviation from the main line.
KeepENVxOposite = true // this parameter will be used in some Envelopes strategies such as TypeEnvelopesFiltre=1 to hold or keep signals until opposite direction signal, we will post additional in description


Envelopes bands strategy #1 ( TypeEnvelopesFiltre = 1 )

TypeEnvelopesFiltre=1 – EA use only one SlowEnvelopes indicator parameters. If price go out SlowEnvelopes Channel – EA will open order to expect price will back inside channel of SlowEnvelopes.
If KeepENVxOposite=False – no signal inside Channel.
If KeepENVxOposite=True – EA keep current signal until opposite signal using history crosses in cycles (you will have always signal inside channel wherever you start trading with EA).
Sell at Current not closed yet Bar: Curent Price > SlowEnvelopes upper band
Buy at Current not closed yet Bar: Current Price < SlowEnvelopes lower band 

If at current bar no signals and if parameter KeepENVxOpposite = 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 > SlowEnvelopes upper band at xBar 
Buy at xBar of history:  xBar Closed Price < SlowEnvelopes lower band at xBar

Envelopes bands strategy
Pic1: TypeEnvelopesFiltre=1 signals

Envelopes bands strategy #2 ( TypeEnvelopesFiltre = 2 )

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

ENV2 1
Pic2: TypeEnvelopesFiltre=2 signals

If KeepENVxOposite=True – EA will look at last historical signal (if no current) and will keep it into opposite signal:

ENV2 2
Pic3: TypeEnvelopesFiltre=2 signals

Envelopes bands strategy #8 ( TypeEnvelopesFiltre = 8 )

TypeEnvelopesFiltre=8 – EA use two different periods Envelopes indicators Fast and Slow (strategy same as TypeTMAFiltre=8)

If KeepENVxOposite=False – EA use only two Envelopes at Current Bar and do not keep signal from history crosses (no signal inside SlowEnvelopes):
Buy signal TypeEnvelopesFiltre=8 if bottom band of FastEnvelpes < bottom band SlowEnvelopes
Sell signal TypeEnvelopesFiltre=8 if upper band of FastEnvelpes > upper band SlowEnvelopes

Screenshot at May 04 17 36 31
Pic4: TypeEnvelopesFiltre=8 signals

if KeepENVxOposite=true EA can search and keep signal from latest history crosses if at current bar no signals:

Buy signal TypeEnvelopesFiltre=8 if bottom band of FastEnvelpes < bottom band SlowEnvelopes at History
Sell signal TypeEnvelopesFiltre=8 if upper band of FastEnvelpes > upper band SlowEnvelopes at History

Screenshot at May 04 17 45 05
Pic5:TypeEnvelopesFiltre=8 Sell signal if at current bar no cross – EA look at latest historical cross and keep trading this signal until reverse