What techniques and methods can be used in multiframe indicators to prevent getting a pretty picture due to peeking into the future on higher TFs ? - page 3

 

Two options:

1. use a senior timeframe bar with a shift of 1 backwards.

2. From the senior timeframe to take values not at closing price, but to calculate intermediate values for each bar of the main timeframe. But it is too complicated, there is only one example of such an indicator in the code base. Maybe it is not so complicated, but at least the topic is not elaborated at all.

 
Vladimir Baskakov #:
If I become a moderator, you're second on my list after Zhora

Dreaming of driving?

 
Алексей Тарабанов #:

Dreaming of driving?

That would be interesting.
 
Dmitry Fedoseev #:

Two options:

1. use a senior timeframe bar with a shift of 1 backwards.

2. From the senior timeframe to take values not at closing price, but to calculate intermediate values for each bar of the main timeframe. But it is too complicated, there is only one example of such an indicator in the code base. Maybe it is not so complicated, but at least the topic is not elaborated at all.

Dima, he asked how to hedge against it

 
Алексей Тарабанов #:

Dima, he asked how to hedge against it.

In what way? What do you mean? How do you use an indicator written by someone else? Don't use such indicators at all, and if you write them yourself, write them with the above recommendations in mind.

 
Vladimir Baskakov #:
That would be interesting.
Vladimir Baskakov #:
If I become a moderator, you're second on my list after Zhora

Who's Zhora?

 
Sergey Gridnev #:

Let's say we have M5 and we want to additionally receive data from H1.
Let bar i from M5 correspond to bar j from H1. Obviously, bar j corresponds not only to bar i from M5, but also to eleven other bars. In this case only the opening price of the one-hour bar is guaranteed not to be in the future relative to the five-minute bar.

But in this case H1 will be in the past relative to M5 or M5 in the future relative to H1

although in this case it does not contradict the theme of the topic.

 
Sergey Gridnev opening prices, there is no future in them.

The difference between closing one bar and opening the next is usually 1 point, i.e.

i.e. there is no big difference, but there is more fuss with the opening prices. There are indicators,

There are indicators that use high and low, but you can't get out of the situation with them through the opening price.

 
Dmitry Fedoseev #:

Two options:

1. use a senior timeframe bar with a shift of 1 backwards.

2. From the senior timeframe to take values not at closing price, but to calculate intermediate values for each bar of the main timeframe. But it is too complicated, there is only one example of such an indicator in the code base. Maybe, it is not so complicated, but at least the topic is not elaborated at all.

Will this calculation of the opening price of the current week on the current timeframe chart be correct?

bar_Shift_W1=iBarShift(NULL,10080,iTime(NULL,0,i),false);
open_W1 = iOpen(NULL,10080,bar_Shift_W1);
 
khorosh #:

Would this calculation of the current week's opening price on the current lower TF chart be correct?

I think so. Only add 1 to bar_Shift_W1 to have a bar formed.