Help with lines - page 2

 
it returns nothing I put them in when I saw [] in someones elses code as its where i thought i was going wrong 
 

ObjectCreate("Line", OBJ_VLINE, 0, D'00:00:00', Unused);

ObjectCreate("Line1", OBJ_VLINE, 0, D'07:00:00', Unused1); 

 

That creates the two lines where I want them when compiling gives me a warning date literal string incomplete if I put a date in then it only draws a line for that date

am I on the right tracks? 

 
LTR:

ObjectCreate("Line", OBJ_VLINE, 0, D'00:00:00', Unused);

ObjectCreate("Line1", OBJ_VLINE, 0, D'07:00:00', Unused1); 

 

That creates the two lines where I want them when compiling gives me a warning date literal string incomplete if I put a date in then it only draws a line for that date

am I on the right tracks? 

Why don't you just use my code for midnight and then add 7 hours to that (Midnight + (7 * PERIOD_H1 * 60) )  ?
 
Thanks RaptorUK I will use yours should the + be a - as when I put a + I get 1700 and when I put a minus I get 0700
 
LTR:
Thanks RaptorUK I will use yours should the + be a - as when I put a + I get 1700 and when I put a minus I get 0700
Nope, should be a +  Midnight + 7 hours is 7 am . . .   where do you get 17:00 ?  the lines on the chart ? can yo take a screen shot and show it please and also your code please.
 

 

ObjectCreate("Line",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1 * 60)),Unused);

 ObjectCreate("Line1",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1* 60)+(7*PERIOD_H1 * 60)),Unused1);

 

 

 

 ObjectCreate("Line",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1 * 60)),Unused);

 ObjectCreate("Line1",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1* 60)-(7*PERIOD_H1 * 60)),Unused1);

 
LTR:

 

ObjectCreate("Line",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1 * 60)),Unused);

 ObjectCreate("Line1",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1* 60)+(7*PERIOD_H1 * 60)),Unused1);

Please use the   SRC  button when posting code . . .  your brackets are wrong.  Instead of . . 

ObjectCreate("Line",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1 * 60)),Unused);

 ObjectCreate("Line1",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1* 60)+(7*PERIOD_H1 * 60)),Unused1);

 do this . . . 

ObjectCreate("Line",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1 * 60)),Unused);

 ObjectCreate("Line1",OBJ_VLINE,0,TimeCurrent() - (TimeCurrent()%(PERIOD_H1* 60)) + (7 * PERIOD_H1 * 60), Unused1);
 
Thank you I should of noticed that
 

Hi RaptorUK can I ask if I wanted a horizontal line drawn at the highest price and the lowest price between the two time periods I tried code below as you guessed nothing happened I was expecting the lines to be drawn at the high and low not between the two times.

 ObjectCreate("HLine",OBJ_HLINE,0,PRICE_HIGH,2,Unused2);  
 ObjectCreate("Hline1",OBJ_HLINE,0,PRICE_LOW,3,Unused3);

 Can you please point in the direction of where I will find how to draw Hlines on the High & Low points on a chart I have tried PRICE_HIGH and MODE_HIGH can I also add the two time scales after or before the PRICE_HIGH and PRICE_LOW

Reason: