How to calculate in 1 or 5 minutes charts and display in 30 min or hourly charts?
Author: kzliao1
Creation Date: 8/22/2012 8:41 AM
profile picture

kzliao1

#1
How can I do my strategy calculation in 1 or 5 minutes charts but display the result in higher time scale (hourly) chart? The whole multi-timeframe section in the documentation only talks about getting the data from higher timescale charts and super-impose them in lower timescale charts. I need to do it the other way, but tested out function like SetScaleCompressed()which does not seem to work on the other direction. Any pointer would be highly appreciated.
profile picture

Eugene

#2
Not knowing what exactly you want to accomplish, here's a standard pointer to the Wiki:

Intraday / Multi-Time Frame | Accessing Intraday data from Daily

The principle is the same for intraday to intraday. If it's again not what you're after, please clarify where you want to get with this.
profile picture

Cone

#3
You cannot superimpose a lower timeframe chart onto a higher one... unless! you create your own ChartStyle for that purpose. You see, if you want to put 60 1-min bars within an hourly chart, then you need to add 60 bars for each bar in the hourly chart. Logically, it makes a lot more sense to do it the way since the bars are already there, and, you can do it "right out of the box".
profile picture

kzliao1

#4
Thanks Eugene and Cone. I will try out Eugene's suggestion soon. The reason that I am doing this is that I am trying to use 1-minute chart data to do volume analysis to mimic catching the large players during the trading hour. By catching the large player's accumulation force, I can try to predict the stock price's direction. The the view span of minute chart is very limited. so i try to display the result in higher scale chart to see the trend better. In any case, thanks for the feedback.
profile picture

Cone

#5
Here's a thought for you. You can access a lower timeframe's data from a higher timeframe's chart and analyze it in an unsynchronized way. However, to display anything on the higher chart, you have to synch it first.

Here's an example of getting 3-minute data for a symbol from a higher time frame. The key is to identify the DataSet in the call to GetExternalSymbol. Hope it helps.

CODE:
Please log in to see this code.
profile picture

kzliao1

#6
This is wonderful. Exactly what I needed. Many thanks Cone!
Ken
profile picture

kzliao1

#7
Hi Cone and Eugene:

I used the GetExternalSymbol() technique, it works wonderfully for me except one small item, this function seems to return the whole dataset instead of the given Date Range. The whole dataset is much bigger and hence makes my calculation much longer. Any suggestion on getting the external data with the given date range? Many thanks!

Ken
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).