Download MetaTrader 5
To add comments, please log in or register
Sell products via the Market and track your sales statistics
promise ekere
17
promise ekere 2015.06.22 14:20 

please can any one help me out i have been trying to draw lines in an array that is in a sequence of 10pips to 5000pips above the array and a sequence of 10pips to 5000pips below the array this how far have gone :

#property indicator_chart_window
input int     Step = 10;
double YesterdayHigh;
double YesterdayLow;
double YesterdayClose;
double Day_Price[][6];
double R_Lines[500];
double S_Lines[500];
double PP;
double  PP_TWO;
int index;
int index_two;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {

//---
   return(0);
  }
  int deinit()
  {
ObjectDelete("S_Line");
ObjectDelete("R_Line");
 return(0);
   }
int start()
  {
//---
   ArrayCopyRates(Day_Price,(Symbol()), 1440);
  
    YesterdayHigh  = Day_Price[1][3];
   YesterdayLow   = Day_Price[1][2];
   YesterdayClose = Day_Price[1][4];
  

   
    PP = ((YesterdayHigh + YesterdayLow + YesterdayClose)/3);
   
   
    for(index=0; index<499; index++)
    {
    R_Lines[index]+=Step;
   
  R_Lines[index]+=PP;
    
    
   
   
    }
  
   PP_TWO = ((YesterdayHigh + YesterdayLow + YesterdayClose)/3)-10;
   
    for(index_two=0; index_two<499; index_two++)
    {
    S_Lines[index_two]+=Step;
   
  R_Lines[index_two]-=PP_TWO;
   

  
   }
   return(0);
  }
//+------------------------------------------------------------------+
 PLEASE CAN SOMEONE HELP ME OUT BY CREATING LINES ON R_Lines and S_Lines

whroeder1
13592
whroeder1 2015.06.22 17:04  
grace27:

please can any one help me out i have been trying to draw lines in an array that is in a sequence of 10pips to 5000pips above the array and a sequence of 10pips to 5000pips below the array t    

for(index=0; index<499; index++)
    {
    R_Lines[index]+=Step;
   
  R_Lines[index]+=PP;
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Your question make no sense. An array is a collection. You can't drawn on an array. There is nothing above an array. There is nothing below an array.
  3. You don't need any arrays. you just need the values and draw the lines.
    double price = PP;
    for(index=0; index<499; index++){
       string name="Above"+string(index)
       ObjectCreate(name, OBJ_HLINE, 0, price, 0)
       price +=Step * pips2dbl;
    }
JD4
1101
JD4 2015.06.23 05:12  
WHRoeder:

  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Your question make no sense. An array is a collection. You can't drawn on an array. There is nothing above an array. There is nothing below an array.
  3. You don't need any arrays. you just need the values and draw the lines.
They might mean draw the lines based on values from within the array.  That is the only way this could possibly work.  I try to remember that not everyone uses English as their primary language, and what they are asking might not be clear in English, but also might not be what they are actually asking clearly in their own language.
/
To add comments, please log in or register