tell me where I'm going wrong please...
vertical lines one at midnight and the other at seven in the morning.
For large amounts of code, attach itint HH=TimeHour(Time[0]); int HH1=TimeHour(Time[7]);
Start by telling me what Time[0] and Time[7] return? What HH and HH1 are? And what time you are passing to ObjectCreate()?
[0] I am hoping is midnight and
[7] is 7am
HH & HH1 I understood I had to assign something to TimeHour which would then tell the program where to draw the lines
have i completly mis-understood what I read
[0] I am hoping is midnight and
[7] is 7am
HH & HH1 I understood I had to assign something to TimeHour which would then tell the program where to draw the lines
have i completly mis-understood what I read
I took WHRoeder advice to Read The Fucking Manual I also looked at the link you advised RaptorUK can you tell where in the manual under TimeCurrent its says (PERIOD_D1 * 60) under Date & Time Functions.
In
int Hour( | ) |
Returns the hour (0,1,2,..23) so i assumed 0 was midnight and 7 would be 7am obviously I was wrong I guess for someone like WHRoeder who knows how this all works giving a little help to someone is just too much to ask
I took WHRoeder advice to Read The XXXX Manual I also looked at the link you advised RaptorUK can you tell where in the manual under TimeCurrent its says (PERIOD_D1 * 60) under Date & Time Functions.
In
int Hour( | ) |
Returns the hour (0,1,2,..23) so i assumed 0 was midnight and 7 would be 7am obviously I was wrong I guess for someone like WHRoeder who knows how this all works giving a little help to someone is just too much to ask
You might want to edit your post to remove you inappropriate language, it serves no purpose other than harming any point you may want to make.
Why are you quoting the function Hour() ? you don't use this function in your code, you do use Time[], did you read the Documentation on that Predefined variable ? it says "Series array that contains open time of each bar of the current chart." so Time[0] is the open time for bar 0, bar 0 is the currently forming bar.
If you want to use my code to determine the datetime of Midnight feel free, if you don't then by all means work out when Midnight was for yourself.
Thank you for your help RaptorUk I will go back to the documentation as I still don't get it hopefully one day I will, as reading something from the documentation is all good until you get stuck and thought this was the place to ask just like my code wrong again and as for upsetting WHRoeder with what I put I'm sure he's thicker skinned than that.
I asked you some questions, so you would learn. But you refuse to answer. Twice.
Apparently you don't want to learn, you just want a snippet to drop into your code.
Therefor you get my standard line: Since there are no slaves here, you have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all I am very new to MQL4 and hoping someone will feel sorry for me and tell me where I'm going wrong please...
To start with I'm trying to draw two vertical solid red lines on a chart one at midnight and the other at seven in the morning.
When I run what I have written I get one at midnight and nothing at seven and the midnight one is dotted not solid.