MTF SSD question

Moderator: admin

MTF SSD question

Postby ZoranB » Thu Feb 14, 2019 5:23 pm

Hi Apprentice,
First, thank you for a huge amount of information on this forum and great templates.
I am having a challange finding an answer to a quite simple question related to reading on the INTRA-BAR changes for SSD.

As I am writing a strategy that places an order on H1 when H4 and D1 SSD are aligned, I am noticing that due to difference in stream source (i.e., H1 vs D1) some entries should be filtered.
The issue is that while D1 might be UP right now, K&D might cross down within couple of hours but this crossing down would not be confirmed due to the source working on D1 candle close.

My question is following: How can I read the CURRENT value (not a value as of close of the last candle) for D1 so that I can avoid taking a LONG trade if the K crossed down D within the day?
So how to read the intra-day value of i_t2_SlowStoch (based on D1 stream) whenever the T_Source (based on H1 stream) is validated.

Thanks...
Zoran

Here is my code to give you better idea what I ama trying to do...

--Current TF
T_Source = ExtSubscribe(0, nil, Timeframes.CurrentTF, instance.parameters.Type == "Bid", "bar");
i_t_SlowStoch = core.indicators:create("SSD", T_Source, T_KPeriods, T_DSlowPeriods, T_DPeriods)
--Higher TF
T1_Source = ExtSubscribe(1, nil, Timeframes.HigherTF, instance.parameters.Type == "Bid", "bar");
i_t1_SlowStoch = core.indicators:create("SSD", T1_Source, T1_KPeriods, T1_DSlowPeriods, T1_DPeriods)
--Master TF
T2_Source = ExtSubscribe(2, nil, Timeframes.MasterTF, instance.parameters.Type == "Bid", "bar");
i_t2_SlowStoch = core.indicators:create("SSD", T2_Source, T2_KPeriods, T2_DSlowPeriods, T2_DPeriods)
ZoranB
 
Posts: 6
Joined: Wed Jan 30, 2019 12:37 am

Re: MTF SSD question

Postby Alexander.Gettinger » Thu Feb 21, 2019 12:39 pm

For example, the current data for i_t_SlowStoch is i_t_SlowStoch.DATA[i_t_SlowStoch.DATA:size()-1].
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 10 guests