![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In that case you simplify remove the date portion from TimeCurrent()
date/time (2017)Find bar of the same time one day ago - MQL4 programming forum (2017)
Hi,
i've been testing the code and its working fine with me, only there is an odd behavior couldn't find the solution or what is the reason.
as the screenshot below show, on the first bar on the new day the line will flip to the back, this is only on the first bar on every new day!!?
below additional screen added
i just noticed, its always the same numbers
Today Time: 1604898000
Today High Value: 1965.5
Hi everyone, i'm new to programming and to this nice forum :D
with this code i'm trying to draw a line from the previous day high to the current day high,
i got the values for each but couldn't specify the time correctly
time[0]
... is dependent on the TF ... since you are dealing on the daily highs only ... you could create a datetime variable, assigning a variable to it
Note:
If the chart is moving up, the high t2 would be changing
You are learning and you coded this, impressive, using
... is dependent on the TF ... since you are dealing on the daily highs only ... you could create a datetime variable, assigning a variable to it
Note:
If the chart is moving up, the high t2 would be changing
Honestly, I couldn't figure out how to do this way,
currently I've added an if statment to the line create:
I know its not practical,but it solved the issue :D
I believe the only issue that if the high came at this candle I’m ignoring, then it will not consider it, I didn't come across this on tester, but obviously that’s what will happen in this case I guess.
Honestly, I couldn't figure out how to do this way,
currently I've added an if statment to the line create:
I know its not practical,but it solved the issue :D
it would do it, but, am sure you want it to touch both highs( from start to end) then ray left or right, achieving that would not be difficult