Doubt about MTF problem

Back to topics list To post a new topic, please log in or register
avatar
26
Messi86 2016.05.09 13:00
 
Hi all,
i want to ask one question. I still cant solve my problem and i saw much code but nothing like what i try, or i did not see correct the codes.

The problem is that i want to do calculations of other timeframe when bar of current timeframe close. For example, text with close bar of first H1 bar on chart H4 when bar of H4 end.

what function must i use for write close of H1 bar at the end of H4 bar?

 

Thank you very much 

avatar
2017
gooly 2016.05.09 13:33 #
 
Messi86:
Hi all,
i want to ask one question. I still cant solve my problem and i saw much code but nothing like what i try, or i did not see correct the codes.

The problem is that i want to do calculations of other timeframe when bar of current timeframe close. For example, text with close bar of first H1 bar on chart H4 when bar of H4 end.

what function must i use for write close of H1 bar at the end of H4 bar?

 

Thank you very much 

"use for write close of H1 bar at the end of H4 bar"

The close of H1 at the end of H4 is  the same:

//at e.g. 16:59:59
bool isCorrect = iClose(NULL,PERIOD_H1,0) == iClose(NULL,PERIOD_H4,0); 
avatar
13009
WHRoeder 2016.05.09 13:51 #
 
avatar
26
Messi86 2016.05.09 13:56 #
 
gooly:

"use for write close of H1 bar at the end of H4 bar"

The close if H1 at the end of H4 is  the same:

Thank you very much!!! i will try your logic
avatar
26
Messi86 2016.05.09 13:58 #
 
WHRoeder:
Don't mix apples and oranges

Sorry, i dont understand your post. You refer to mql4 programming or trading??.

I like hear your point of view.

 

Thank you very much 

avatar
1229
FMIC 2016.05.09 15:17 #
 

You seem to me missing the obvious.

  1. With regard to the Bar Shift "0" (the current bar), the current Close Price at ALL time-frames (not just H4 and H1, but all of them) will have the same Close Price which is the current Bid price.
  2. With regards to the Bar Shift "1" (the previous bar), during the 1st minute of opening the current bar (shift "0") on the Higher time-frame, it will have the same close price as the lower time-frames. So during this 1st minute (not inclusive), the Close[1] for H4 will be the same as Close[1] for H1, M30, M15, M5 and M1.

This may seem obvious after seeing it written down, but sometimes in our haste to do things we sometimes forget the obvious.

Back to topics list  

To add comments, please log in or register