[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 456

 

Good afternoon.

Please advise me, oh great gurus!:)

Is it possible to finish the Fibonacci Lines?

I would like to see the following implementation -

After drawing these lines on the chart, the price of this level would be automatically written in front of the levels.

And it would automatically change when stretching the fib

 
sss2019:

Display lines on the graph according to data from the arrays. The alerts show that the arrays are full, but the lines are not displayed.


Something is being drawn

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_minimum 0
#property indicator_maximum 100

double mass1[];
double mass2[];

extern bool A = false;

void init() {
   SetIndexBuffer(0, mass1);
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1);
   SetIndexBuffer(1, mass2);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1);
}

void start() {
   int limit = Bars - IndicatorCounted();
   int i = 0, g = 0, summ = 0;
   int startbar, endbar, starttime, endtime, lowbarend, lowbarstart, highbarstart, highbarend;
   double low, high;
   int lowsum, highsum;
   starttime = iTime(Symbol(), Period(), i);
   endtime = iTime(Symbol(), Period(), i + 1);
   startbar = iBarShift(Symbol(), PERIOD_M1, starttime, false);
   endbar = iBarShift(Symbol(), PERIOD_M1, endtime, false);
        
   while(i < 5) {
      lowsum = 0;
      highsum = 0;
      if(i != 0) {
         starttime = iTime(Symbol(), Period(), i);
         endtime = iTime(Symbol(), Period(), i + 1);
         startbar = iBarShift(Symbol(), PERIOD_M1, starttime, false);
         endbar = iBarShift(Symbol(), PERIOD_M1, endtime, false);
      }
      else
      {
         starttime = iTime(Symbol(), Period(), i);
         endtime = iTime(Symbol(), Period(), i + 1);
         startbar = iBarShift(Symbol(), PERIOD_M1, TimeCurrent(), false);
         endbar = iBarShift(Symbol(), PERIOD_M1, endtime, false);
      }
                        
      //Alert(TimeToStr(starttime, TIME_DATE|TIME_MINUTES),"   ",TimeToStr(TimeCurrent(), TIME_DATE|TIME_MINUTES));   
      low = iLow(Symbol(), PERIOD_M1, endbar);
      high = iHigh(Symbol(), PERIOD_M1, endbar);
      lowbarend = endbar;
      highbarend = endbar;
      lowbarstart = endbar;
      highbarstart = endbar;
                
      while(endbar >= startbar) {
         if((low - iLow(Symbol(), PERIOD_M1, endbar)) / Point > 0) {
            //Alert(low, " ", iLow(Symbol(), PERIOD_M1, endbar), " ", endbar, " ", startbar);
            low = iLow(Symbol(), PERIOD_M1, endbar);
            lowbarstart = endbar;
         }
         if((iHigh(Symbol(), PERIOD_M1, endbar) - high) / Point > 0) {
            high = iHigh(Symbol(), PERIOD_M1, endbar);
            highbarstart = endbar;
            //Alert(high, " ", iHigh(Symbol(), PERIOD_M1, endbar), " ", endbar, " ", startbar);
         }
         endbar--;
      }
      //Alert(highbarstart, " ", highbarend, " = ", lowbarstart, " ", lowbarend);
                        
      while(lowbarstart < lowbarend + 1) {
         lowsum = lowsum + iVolume(Symbol(), PERIOD_M1, lowbarstart);
         lowbarstart++;
      }
      while(highbarstart < highbarend + 1) {
         highsum = highsum + iVolume(Symbol(), PERIOD_M1, highbarstart);
         highbarstart++;
      }
      mass2[i] = lowsum;
      mass1[i] = highsum;
//      Alert(mass2[i], " ", highsum, " ", ArraySize(mass1));
      //Alert(mass1[i], " ", i);
      i++;
   }
}
 
neon51r:


Is it possible to complete the Fibonacci Lines?


Once these lines have been drawn on the chart, the price of that level would automatically be written against the levels.

And it would automatically change as the fib is stretched

Of course you can, why not?
 
Vinin:


Drawing something


Thank you, and what did you fix, please tell me? I'm not good at comparing code
 
VladislavVG:
Of course you can, why is it not working ?

Everyone)) I don't know mql

Can you please tell me what to edit ?) and which file should I edit ?

 
neon51r:

Everyone)) I don't know mql

Can you please tell me what to dig?) and which file should I edit?

Your choice:

  1. Work

  2. Workbook and Documentation
 
Reshetov:

To choose from.

Thank you)

All decided. Thank you:%)

 
sss2019:

Thank you, what did you fix, please tell me? I'm not good at comparing code

double mass1[];
double mass2[];
 

Can you advise on the technical implementation of this?

If the internet connection on the workstation is lost, then the phone or gsm modem connected to the workstation (the same) will send an sms message?

 
solar:

Can you advise on the technical implementation of this?

If the Internet connection on the workstation is lost, then connected to the workstation (the same) phone or gsm-modem, performed the sending of SMS messages?

I had a program that sends a message to ICQ. Page with files and description ... https://www.mql5.com/ru/code/10352

In the code of the Expert Advisor you can lay the function of sending a message when the internet breaks and connects ....

Reason: