Divide the chart into ten horizontal parts showing lines level

To add comments, please log in or register
Nieco Pama
192
Nieco Pama  
Hello everyone. I just wanna ask of some scripts or indicator that will divide the chart into 10 horizontal equal parts and it shows the horizontal level as level 10, 20, 30, 40, 50, 60, 70, 80, and 90.

Thank very much in advance for the all the people who wants to help. 

God bless you all and pips be with you always... 

Marco vd Heijden
Moderator
12534
Marco vd Heijden  

And what would be your starting point ? 


Here is a small example.

//+------------------------------------------------------------------+
//|                                                         Grid.mq4 |
//|                        Copyright 2019, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property script_show_inputs
//--- input parameters
input int      depth=10;
input int      distance=30;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   for(int i=1; i<depth; i++)
     {
      ObjectCreate(0,"Grid-High-"+IntegerToString(i),OBJ_HLINE,0,0,Open[0]+(i*distance)*Point);
      ObjectCreate(0,"Grid-Low-"+IntegerToString(i),OBJ_HLINE,0,0,Open[0]-(i*distance)*Point);
     }
  }
//+------------------------------------------------------------------+
Nieco Pama
192
Nieco Pama  
Marco vd Heijden:

And what would be your starting point ? 


Here is a small example.

I dont know either but i just want to divide it equally. Can i use percentage? Like 10%, 20% up to 90%. Anyway thank ypu very much for the help. I will try to use this and i hope this can gives me additional knowledge. God bless you sir... 
Marco vd Heijden
Moderator
12534
Marco vd Heijden  

10%, 20% up to 90% from where from what where to start ?

The chart is dynamic it is always moving so it doesn't really make sense to divide that chart width or height.

You usually take a starting point like the daily open or the last highest high and etc.

Nieco Pama
192
Nieco Pama  
Marco vd Heijden:

10%, 20% up to 90% from where from what where to start ?

The chart is dynamic it is always moving so it doesn't really make sense to divide that chart width or height.

You usually take a starting point like the daily open or the last highest high and etc.

Ok sir.. thank you for the idea. God bless you always.. 
To add comments, please log in or register