Perhaps you could try:
intsections[i].time = TimeCurrent() - iTime(NULL,0,shift);
Get the seconds into the current bar and add this to the start of the bar you're interested in:
int secondsSinceNewBar = TimeCurrent() - iTime(NULL,0,0); intsections[i].time = iTime(NULL,0,shift) + secondsSinceNewBar;

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
Hello,
please help me with this. Let's say I'm in H1 and I'd like to calculate the exact time of an intersection
like that
intsections[i].time = TimeCurrent() - ( shift * 3600)
shift is the amount of periods (hours) the last intersection happened. I substract that amount of time in seconds from the current time.
This works as long as there's no weekend in between, otherwise it will mess up the calculated time by 2 days.
Can you help? Thanks a lot.