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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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);
}
//+------------------------------------------------------------------+