can anyone convert this gridline indicator to array? - page 2

 
pek4christ:
But the Grid indicator is drawing gridlines but when you look at it on the expert conner its saying array is out of range... thats why my ea is not opening trades.thanks for making it half way done..
Can you show the whole modified code? You can add it in private message.
 

can anyone convert this gridline indicator to array


 arrays must be added inside the init code, to have arrays,

int init()
  {
  
     SetIndexBuffer(0, lvl_0);
   SetIndexStyle(0, DRAW_LINE);

   SetIndexBuffer(1, lvl_1);
   SetIndexStyle(1, DRAW_LINE);

     SetIndexBuffer(2, lvl_2);
   SetIndexStyle(2, DRAW_LINE);

   SetIndexBuffer(3, lvl_3);
   SetIndexStyle(3, DRAW_LINE);

       SetIndexBuffer(4, lvl_4);
   SetIndexStyle(4, DRAW_LINE);

   SetIndexBuffer(5, lvl_5);
   SetIndexStyle(5, DRAW_LINE);

     SetIndexBuffer(6, lvl_6);
   SetIndexStyle(6, DRAW_LINE);

   SetIndexBuffer(7, lvl_7);
   SetIndexStyle(7, DRAW_LINE);
    
     SetIndexBuffer(8, lvl_8);
   SetIndexStyle(8, DRAW_LINE);

   SetIndexBuffer(9, lvl_9);
   SetIndexStyle(9, DRAW_LINE);

    return(0);
  }
 


then a starting point should be choosen ; this be lvl_0[]

  level_start = NormalizeDouble(Close[0],2);