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
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) ) ?
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.
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.
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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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?
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?
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
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);
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 . .
do this . . .
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.
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