Updating data from higher time frames

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Updating data from higher time frames

Postby pawelas » Tue Aug 31, 2010 2:52 pm

Hi,
I am wondering how to update data from higher frame in update function. I noticed that if spot price changes, averages change for all time frames, but it is not updated into charts.
For example, in MF_MA on 1min chart 5min chart MA (eg 15 period MA from 5min chart) should be straight line over 5min period, only it should move higher or lower depending on price action. So, is it possible that 5min chart moving average would be updated continuously until this candle ends(on 1min chart)?

With second and third (MA direction indicator and heat map) it is the same issue, that indicator colors don't change dynamically with price action, so every update should update last candle in every time frame included in the indicator. Also, once indicator output is calculated once for last minute it is not recalculated if price changes (while looking at charts live). I am using closing prices.

Is there easy solution to this issues? I was was thinking about additional code in function update, but I am not a programmer and have no idea what expression should be added to the update function to dynamically update output for last candle for each time frame.

http://www.fxcodebase.com/code/viewtopic.php?f=18&t=1033
http://www.fxcodebase.com/code/viewtopic.php?f=17&t=759
http://www.fxcodebase.com/code/viewtopic.php?f=17&t=1617
pawelas
 
Posts: 6
Joined: Sun Aug 29, 2010 10:15 pm

Re: Updating data from higher time frames

Postby Nikolay.Gekht » Thu Sep 02, 2010 12:16 pm

Yeah, I see you point. Yes, it's easily to do that feature. All you need is just to update all bars backward until the upper time frame candle is the same. I'll prepare the example of MF_MA indicator shortly.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC


Return to Discussions

Who is online

Users browsing this forum: No registered users and 37 guests