Help me please

Back to topics list To post a new topic, please log in or register
avatar
2
morenokosta 2015.07.27 22:22
 

 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);

  }

//+------------------------------------------------------------------+

avatar
Moderator
3407
GumRai 2015.07.28 00:55 #
 

That is not a function, it is code for an indicator.

It cannot be inserted anywhere, it can be merged with another indicator.

If you can explain precisely what you require, click on the "Freelance" link at the top of the page. There you can pay someone to do your job. 

avatar
2
morenokosta 2015.07.28 01:21 #
 
Hello GumRai,  thanks for the reply.
I found someone who has solved the problem
Back to topics list  

To add comments, please log in or register