Addition of 4 Time houres to a number

 

Hallo everyone, 

I will addition times in my EA - 23 (clock) + 4 (hour) = 3 (clock) 

i habe a variable we name it VARIABLE_1 = „23“ (only this number 23 - NOT in Time Format 23:00) and I will addition it with an other variable we name it VARIABLE_2 = „4“ (only this number 4 - NOT in Time Format 4:00) 

The summ of it must be = „3“ - NOT „3:00“

Has anybody an idea?

 
SuperWutsch: Has anybody an idea?
  1. No because your post is unintelligible.
  2. There are 24 hours in a day therefor: (23 + 4) % 24 == 3
  3. But that won't take in account weekends and market holidays. For that stop using hours. Remember the original time, use iBarShift to find the H1 bar and if that is bar 4 it has been four trading hours.