Hello GumRai, thanks for the reply.
I found someone who has solved the problem
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I need to insert this function (extern double BandsDeviations = 2.0) but I have a big problem ... I know nothing about programming, I hope some expert can help me
Thank You
PS: sorry for my bad English
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_width1 1
//---- indicator parameters
extern int BandsPeriodRed=24;
int BandsPeriod1=1;
extern int BandsShiftRed=0;
extern int BandsPeriodBlue=19;
int BandsPeriod2=1;
extern int BandsShiftBlue=0;
double LowerMirror1[];
double LowerMirror2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexBuffer(0,LowerMirror1);
SetIndexBuffer(1,LowerMirror2);
return(0);
}
//+------------------------------------------------------------------+
//| Bollinger Bands |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int i,limit;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = MathMin(Bars-counted_bars,Bars-1);
//
//
//
//
//
for(i=limit; i>=0; i--) LowerMirror1[i] = (iMA(NULL,0,BandsPeriodRed,BandsShiftRed,MODE_SMA,PRICE_CLOSE,i)-iMA(NULL,0,BandsPeriod1,BandsShiftRed,MODE_SMA,PRICE_CLOSE,i))+iMA(NULL,0,BandsPeriodRed,BandsShiftRed,MODE_SMA,PRICE_CLOSE,i);
for(i=limit; i>=0; i--) LowerMirror2[i] = (iMA(NULL,0,BandsPeriodBlue,BandsShiftBlue,MODE_SMA,PRICE_CLOSE,i)-iMA(NULL,0,BandsPeriod2,BandsShiftBlue,MODE_SMA,PRICE_CLOSE,i))+iMA(NULL,0,BandsPeriodBlue,BandsShiftBlue,MODE_SMA,PRICE_CLOSE,i);
return(0);
}
//+------------------------------------------------------------------+