Download MetaTrader 5

Indicators: MA_BBands_YXF

To add comments, please log in or register
Have you developed an application? Publish it in Code Base!
Automated-Trading
Admin
99093
Automated-Trading 2014.10.16 11:21 

MA_BBands_YXF:

The indicator is a combination of MA channels and Bollinger Bands.

MA_BBands_YXF MetaTrader4

Author: johnsun888

ffoorr
1016
ffoorr 2014.10.20 16:38  

nice indicator, shift is not needed, it do not repaint :


       bb_high[i]        = iBands(NULL,0,BBPer,BBDev,0,PRICE_HIGH,MODE_UPPER,i);
       ma_high_short[i]  = iMA(NULL,0,4,0,MODE_LWMA,PRICE_HIGH,i);  
           
       bb_low[i]        = iBands(NULL,0,BBPer,BBDev,0,PRICE_LOW ,MODE_LOWER,i);
       ma_low_short[i]  = iMA(NULL,0,4,0,MODE_LWMA,PRICE_LOW,i);  
  
     double  OsMA_0 = iOsMA(NULL,0,8,10,OsMA,PRICE_CLOSE,i) ;
     double  OsMA_1 = iOsMA(NULL,0,8,10,OsMA,PRICE_CLOSE,i+1) ;

      
      if(  ma_high_short[i] > bb_high[i] && OsMA_1 >0 && OsMA_0 <0 )
        arrow_down[i] = High[i] + iATR(NULL,0,200,i);
      if(  ma_low_short[i] < bb_low[i] && OsMA_1 <0 && OsMA_0 >0 )
        arrow_up[i] = Low[i] - iATR(NULL,0,200,i);
iwjw
33
iwjw 2014.10.20 18:48  

If you let the indicator run on a live feed and then reattach it, you will see, that some arrows might disappear

That happened i.e. for a blue arrow where price went further down after the arrow was set

Adil Malik
154
Adil Malik 2014.10.27 03:16  

sadly, it repaints.. 

looks perfect at first look, but really sad to see it repaints ... a million times 

Jerry Spence
216
Jerry Spence 2014.10.28 12:08  

It really only works on flat markets. The problem is that when the price rises above the upper band, the indicator suggests going short. However, if the price keeps rising, it carries on suggesting shorts.The only time it will suggest going long is if the price falls below the lower band, which it never does on an upward trend.

-Jerry

ffoorr
1016
ffoorr 2014.11.20 12:52  
adil149:

sadly, it repaints.. 

looks perfect at first look, but really sad to see it repaints ... a million times 

Just delete the MoveShift and it will not repaint
FXDISCIPLINE
372
FXDISCIPLINE 2014.11.21 00:41  

Hi I didnt understand, can you pls post the revised version without the moveshift ? if you can 

I am not a coder , hence the request 

MINUX75
7
MINUX75 2014.12.21 05:38  

there is new code with extern int MoveShift = 0;  hence it does not repaint  anymore if  MoveShift  stay to 0.

I fixed two others bugs,  the BBband do not geopardise when  MoveShift  is positive. 

The indicator buy or sell  works well with old datas 

Files:
awaisakram
6
awaisakram 2014.12.21 08:32  
Good Indicator MA_BBands_YXF, please make it for meta trader 5,thanks
MINUX75
7
MINUX75 2014.12.21 09:26  

V2 version with ffoorr  improvements.  for the text see above . For the code click below

 

ENJOY 

Files:
Tez_Y
58
Tez_Y 2015.04.23 21:47  

If i Put 0 (zero) in shift will not repaint anymore?

Thanks 

12
To add comments, please log in or register