need help in expanding Range bars to the Time based time frame

boarders

Well-Known Member
#12
range bar charts do not paint a candle as per timeframe of the chart, like for example, in a 1 min tf chart a new candle is started every minute and the previous candle closed. but in a range bar chart, a new candle will be started only if the price crosses the set range in ticks. 1 range in tick is one paise - thus 100 range in tick is 1 rupee, so for example, if a chart is set to show 100 range in tick, then a new candle will be started only if the price moves beyond 1 rupee in either direction irrespective of the time, so if price remains within a range of less than one rupee for 30 minutes from market open, then the days first candle will be the only candle painted and will be the running candle for that 30 minutes, and then the second candle will form at 0945 as the price moved beyond 1 rupee at that time and if this price supasses another 1 ruppee within a minute then second candle will complete having only a duration of 1 minute and third candle will start and so on...
 

extremist

Well-Known Member
#13
come on friends .... the original purpose of my thread is getting lost.
please stick to the subject.


i know we can do compress and expand time frames on time based time frames like this :

TimeFrameSet( in15Minute); //set Time frame to 15 min
m = MA( P, Periods ); // calculate MA
TimeFrameRestore(); // restore Time frame to original

now if we want to see it on 1 min Time frame then we will do

M_on_15min=TimeFrameExpand( m, in15Minute,Expandfirst);

this all is ok.

But what if we want to calculate MA on range bars and show on 1 min.

i tried like this :

TimeFrameSet(3) // sets mode to Range bars
TimeFrameSet(500); //sets range bars to 5 points
m = MA( P, Periods ); // calculate MA
TimeFrameRestore(); // restore Time frame to original

now next what..........?

i tried expanding the way above but didn't work.
searched the help file but not found answer.

so seeking some Master to guide me now.

Whether this is possible or not if yes then how to do it?


come on friends .... the original purpose of my thread is getting lost.
please stick to the subject.
 
Last edited:

trash

Well-Known Member
#17
TimeFrameMode( 4 ) can only be used if selected Interval in toolbar is 1-Tick. Otherwise it makes no sense to use compressed range bar interval to construct other compressed higher range bar interval.

Also see quote by T.J.

Hello,

Thank you very much for your e-mail.

You are making mistake in your thinking.
Starting condition differs. If you are creating 20R out of 5R data
the starting point is usually different than if you create 20R data out of tick data.
You need to think it over and try to produce 20R chart out of tick data "by hand"
to understand.

Best regards,
Tomasz Janeczko
amibroker.com
 

extremist

Well-Known Member
#18
TimeFrameMode( 4 ) can only be used if selected Interval in toolbar is 1-Tick. Otherwise it makes no sense to use compressed range bar interval to construct other compressed higher range bar interval.

Also see quote by T.J.
Completely agreed to u trash but i still couldn't figure out the way to expand the Range bar over time based intervals.

even i failed to understand the hint u given by that TJ Quote.

one thing i understood is, here also the starting point will be different.
but unable to use it in solving the problem.

If u could throw some light on it that will be of great help.

actually now i started thinking that "Is it really possible?"
if yes then please guide me through.
 
Last edited: