indicator to draw many Vlines

 

hi i have a code that draw a vertical line(only one Line).......but some times i need to draw more than ten Vlines (even 50 lines) at the same time...

and the dates  between the lines are not equal (or the problem could be solved by using cycle lines ) 

could we modify the indicator code to do this?

//+------------------------------------------------------------------+
//|                                                            vertical.mq4 |
//|                      Copyright © 2011, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window


extern color LineColor=Red; 
extern int LineStyle=STYLE_DASH;
extern datetime StartTime1=D'2020.04.26 04:00';





//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {


{

   int D1=StartTime1;
  
      }
      
string VLineName1=DoubleToStr("1.75",3)+"Date"+"as Previous 12345";



      {
 
       ObjectCreate(VLineName1, OBJ_VLINE,0,D1,D1,D1,D1); 
       ObjectSet(VLineName1, OBJPROP_STYLE, LineStyle);
      ObjectSet(VLineName1, OBJPROP_COLOR, LineColor);
      
      
      }
    
      
   return(0);
 }
//+------------------------------------------------------------------+

 
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
 

Keith Watford   i was wondering why the website is www.mql5.......  

so i rewrite the address manually  in the navigator  to be  ( www.mql4/en/forum)

but  i got   only  a big  404 message ....it seem that i made something wrong....so i decided to write here

sorry for that 


AIRAT SAFIN

thanks for your help ....but your script is in Mql5 ....am working with mt4


 
  1. abd-: could we modify the indicator code to do this?

    What is this “we” you reference?

    You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
              No free help 2017.04.21

  2. An object must have a unique name.

 

William Roeder 1 .[ Show us your attempt ]

                         ------------------------------------------------------

What is this “us” you reference?

answer :( every one in this site except you)


first of all...are you the owner of this site? or a moderator? because i see  and saw some anger in your words and replays (because it's not the first time i saw something like this from you) toward me or toward any other member who is asking for some help



if  you ,and (only )  you .....see that i didn't stated any problem ( then it my be a {not invitation for you to reply})

                           ---------------------------------------------------------------------------------------------------------------------------------------

William Roeder 2. [We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).]

                           ----------------------------------------------------------------------------------------------------------------------------------------

 .... What is this “we” you reference? 


and please moderator: if you want to delete my post ....it's the same as    William Roeder post .....and accept my opology

Reason: