Download MetaTrader 5
To add comments, please log in or register
Do you want to write a trading robot? Find solution in MQL5 Reference!
jeex
87
jeex 2014.11.08 18:02 

How do i calculate the seconds since the beginning of a bar ( or the seconds before ending the bar )?

Keith Watford
Moderator
8026
Keith Watford 2014.11.08 18:07  
jeex:

How do i calculate the seconds since the beginning of a bar ?


TimeCurrent() - Time[bar index]
jeex
87
jeex 2014.11.08 18:46  
Thanks GumRai.
whroeder1
13656
whroeder1 2014.11.08 20:47  
jeex: How do i calculate the seconds since the beginning of a bar ( or the seconds before ending the bar )?
  1. GumRai: TimeCurrent() - Time[bar index]
  2. int ETA=Time[iBar] + PeriodSeconds() - TimeCurrent(); // May go negative if no ticks.
jeex
87
jeex 2014.11.10 07:46  

Thanks WHRoeder. The game is running now.

Binary Brokers won't like what i've built.

/
To add comments, please log in or register