/*[[ Name := Envelopes Author := tattoo/greybeard_xlx@yahoo.com Link := http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators Separate Window := No First Color := LimeGreen First Draw Type := Line First Symbol := 217 Use Second Data := yes Second Color := Red Second Draw Type := Line Second Symbol := 218 ]]*/ //Notes: Time frame = M15 //Notes: This indicator will generate a MA envelope and Up/Down Arrows when a possible //Notes: reversal is pending. look for a Candle and Awsome Osc. confirmation in the //Notes: direction of the arrow within the next few bars.. // ****As with all indicators, Back check it and see how it preforms B4 use!!*** //******************************************************************************** Defines : mp (25); Vars : shift(0), EHI1(0), EHI2(0), EHI3(0), ELO1(0), ELO2(0), ELO3(0), BandHi(0), BandLo(0); SetLoopCount(0); // loop from first bar to current bar (with shift=0) For shift=Bars-1 Downto 0 Begin SetIndexValue(shift,0); SetIndexValue2(shift,0); BandHi = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_HIGH,shift); BandLo = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_LOW,shift); SetIndexValue(shift, BandHi); SetIndexValue2(shift, BandLo); //**************************************************************** EHI1 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_HIGH,shift+1); EHI2 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_HIGH,shift+2); EHI3 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_HIGH,shift+3); ELO1 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_LOW,shift+1); ELO2 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_LOW,shift+2); ELO3 = iEnvelopes(mp,MODE_EMA,0.3,PRICE_CLOSE,MODE_LOW,shift+3); //**************************************************************** if Close[shift+1] > ELO1 and Low[shift+2] < ELO2 or Low[shift+3] < ELO3 Then { SetArrow(time[shift+1],close[shift+1],218,Red); }; if Close[shift+1] < EHI1 and High[shift+2] > EHI2 or High[shift+3] > EHI3 Then { SetArrow(time[shift+1],close[shift+1],217,LightGreen); }; End;