Traderji.com - Discussion forum for Stocks Commodities & Forex

Multiple timeframe ribbons on one chart

Discuss Multiple timeframe ribbons on one chart at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; I have attached the .afl code for a trading system I located on another website. ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 16th November 2008, 04:58 AM
Member
 
Join Date: Sep 2008
Posts: 14
Thanks: 1
Thanked 5 Times in 1 Post
brevco is on a distinguished road
Reputation: 15
Question Multiple timeframe ribbons on one chart

I have attached the .afl code for a trading system I located on another website. How can I convert the "minute" timeframes to Range bars?

I have been working on trying to do this for months, but have not
been successful.

Ultimately, I would like to create "ribbons" at the bottom of the chart
that show when each timeframe (range bar timeframe) are in
agreement. It has been done in the attached .afl, but it is
in minutes and I would like to convert it to range bars.

If someone could help me with converting the code from
minutes to range bars, then I think I can use that code to
trigger alerts using other indicators....at least that is my
goal.

If someone could assist me, I would greatly appreciate it.

Thank you,
Ev
Attached Files
File Type: doc TRO Indicators Updated Param.doc (62.0 KB, 77 views)
Reply With Quote
The Following 5 Users Say Thank You to brevco For This Useful Post:
kenneth (17th November 2008), kgsirasangi (16th November 2008), niftyrider (16th November 2008), soumya_b (16th November 2008), uasish (16th November 2008)
Sponsored Links
  #2  
Old 17th November 2008, 05:01 PM
Member
 
Join Date: Jun 2004
Posts: 185
Thanks: 4
Thanked 4 Times in 2 Posts
kgsirasangi is on a distinguished road
Reputation: 24
Default Re: Multiple timeframe ribbons on one chart

brevco,

Although, I am not an afl expert, and thus may not be able to help you, I am curious to know what are range bars and how do they help in bettering the chart presentation? PLease give more details at least to understand your requirements. If you have any chart based on range bars, your enclosing the chart would be appreciated.

Regards.
Reply With Quote
  #3  
Old 17th November 2008, 07:40 PM
Member
 
Join Date: Sep 2008
Posts: 14
Thanks: 1
Thanked 5 Times in 1 Post
brevco is on a distinguished road
Reputation: 15
Default Re: Multiple timeframe ribbons on one chart

Hello,

When you set the "range", then you know in advance exactly how many points or "ticks" it needs to move before the next candle (or "range bar") forms. I went to google and typed in "range bars" and came up with the following explanation from the Stocks and Commodities website that I beleive will help.

Range bars are a unique way of building price charts and are excellent in finding the underlying trend and movement of the current bar. Since each bar on the chart has the same range (high to low), it reduces the volatility and noise within the range of the bar.

Range bars are generated continuously as a new tick is formed outside the minimum price range. They are closely related to point & figure or renko charts, which are also based on equal price range change. The range bar chart is a study of pure price movement, and time is not taken into consideration while plotting the price action. Range bar movement is not time-dependent but does depend on price movement when a preset range of a price bar is complete; hence, the time axis (x-axis) on a range bar chart is irrelevant.

When range bars are constructed, chart dependency on the time scale (x-axis) has been removed as it produces its own price scale on the y-axis. This helps remove gaps and produce clear levels of support & resistance. Range bars also work with other trend indicators, all instruments, and all time frame trading. Range bar charts are great for observing active market activity and are helpful in identifying support & resistance lines, buy/sell signals, and trendlines.

I currently use range bars to trade with the CCI.

I hope this helps.

Just this morning, I found something very similar to what I am looking for that someone posted on another website. It was written for the MT4 trading platform and someone converted it to AFL for Amibroker. When I put it on my range bar chart I received an error. The chart needs to be set in minutes. So, I would still need to figure out how to convert it to range bars.

I've attached the file in a word document so it can be cut and pasted into your formula window of Amibroker.

If anyone can figure out how to convert this to range bars, I would be very grateful.

Thank you,

Evelyn
Attached Files
File Type: doc Heinkein 4T.doc (41.0 KB, 39 views)
Reply With Quote
  #4  
Old 17th November 2008, 07:53 PM
Member
 
Join Date: Sep 2008
Posts: 14
Thanks: 1
Thanked 5 Times in 1 Post
brevco is on a distinguished road
Reputation: 15
Default Re: Multiple timeframe ribbons on one chart

Hello,

I tried to attach a screenshot of a range bar chart, and evidently, the file exceeds the limit allowed for this forum.

I'm sure a screenshot could be found through searching Google.

Evelyn
Reply With Quote
  #5  
Old 17th November 2008, 09:21 PM
Member
 
Join Date: Jul 2005
Posts: 451
Thanks: 39
Thanked 56 Times in 32 Posts
kenneth will become famous soon enough
Reputation: 86
Default Re: Multiple timeframe ribbons on one chart

Hi Brevco
Chadrakant has written one for EOD too
/ Define label bar (x) position location
#pragma nocache
blankRightBars = 5; //insert actual blank right bars specified in Preferences
barsInView = Status("lastvisiblebarindex") - Status("firstvisiblebarindex") - blankRightBars;
Offset = Param("Offset Bar", 0.95, 0, 1, 0.01);
textOffset = BarCount - (Offset * barsInView);


TimeFrameSet( inDaily) ;
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
X=Haopen<Ref( Haopen,-1) OR AlmostEqual( Haopen,Ref(Haopen,-1));
Color = IIf( Haopen > Haclose, colorRed, IIf( X,7,14));
Plot(20,"", Color,styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 21,"",colorBlack,styleOwnScale|styleArea|styleNoLa bel,0, 100 );
PlotText("DAILY TREND", textoffset, 81.05, colorWhite);
CondB=Haopen > Haclose;CONDS=Haopen < Haclose;
event1=condS;
PlotShapes( IIf(event1 ,shapeDigit1,0) ,5, 0,81.0);
event2=CondB;
PlotShapes( IIf(event2 ,shapeDigit1,0) , 4, 0,81.0);



TimeFrameRestore();
TimeFrameSet( inWeekly) ;
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
X=Haopen<Ref( Haopen,-1) OR AlmostEqual( Haopen,Ref(Haopen,-1));
Color = IIf( Haopen > Haclose, colorRed, IIf( X,7,14));
Plot(40,"", Color, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 41,"",colorBlack,styleOwnScale|styleArea|styleNoLa bel,0, 100 );
PlotText(" WEEKLY TREND", textoffset, 81.20, colorWhite);
CondB1=Haopen > Haclose;CONDS1=Haopen < Haclose;
event3=condS1;
PlotShapes( IIf(event3 ,shapeDigit2,0) ,5, 0,81.20);
event4=CondB1;
PlotShapes( IIf(event4 ,shapeDigit2,0) , 4, 0,81.2);


TimeFrameRestore();
TimeFrameSet( 10*inDaily) ;
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
X=Haopen<Ref( Haopen,-1) OR AlmostEqual( Haopen,Ref(Haopen,-1));
Color2 = IIf( Haopen > Haclose, colorRed, IIf( X,7,14));
Plot(60,"", Color2, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 61,"",colorBlack,styleOwnScale|styleArea|styleNoLa bel,0, 100 );
PlotText("2 WEEK TREND", textoffset, 81.40, colorWhite);
CondB2=Haopen > Haclose;CONDS2=Haopen < Haclose;
event4=condS2;
PlotShapes( IIf(event4 ,shapeDigit3,0) ,5, 0,81.40);
event5=CondB2;
PlotShapes( IIf(event5 ,shapeDigit3,0) , 4, 0,81.4);


TimeFrameRestore();
TimeFrameSet(20*inDaily) ;
HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
X=Haopen<Ref( Haopen,-1) OR AlmostEqual( Haopen,Ref(Haopen,-1));
Color4 = IIf( Haopen > Haclose, colorRed, IIf( X,7,14));
Plot(80,"", Color4, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 81,"",colorBlack,styleOwnScale|styleArea|styleNoLa bel,0, 100 );
PlotText("MONTHLY TREND", textoffset, 81.55, colorWhite);
CondB3=Haopen > Haclose;CONDS3=Haopen < Haclose;
event6=condS3;
PlotShapes( IIf(event6 ,shapeDigit4,0) ,5, 0,81.65);
event7=CondB3;
PlotShapes( IIf(event7 ,shapeDigit4,0) , 4, 0,81.65);

TimeFrameRestore();
Sell=CondB AND CondB1 AND CondB2 OR Condb3;
Buy= CondS AND CondS1 AND CondS2 OR Conds3;
//Cover= Cond1 AND Cond2 OR Cond2 AND Cond3 OR Cond1 AND Cond3 ;
//Sell= Cond4 AND Cond5 OR Cond5 AND Cond6 OR Cond4 AND Cond6;
Buy=ExRem (Buy,Sell);Sell=ExRem(Sell,Buy);
PlotShapes(shapeCircle*Buy, colorGreen,0,81.85);
PlotShapes(shapeCircle*Sell, colorRed,0,81.85);
GraphXSpace = 15;

//......................................
_SECTION_END();
Regards
ken
Reply With Quote
  #6  
Old 17th November 2008, 10:16 PM
Member
 
Join Date: Jun 2004
Posts: 185
Thanks: 4
Thanked 4 Times in 2 Posts
kgsirasangi is on a distinguished road
Reputation: 24
Default Re: Multiple timeframe ribbons on one chart

brevco,

Thank you for your explanation.
Following web page shows and explains range bar chart

http://www.forextips.com/range_bars.htm

Regards
Reply With Quote
  #7  
Old 18th November 2008, 05:47 AM
Member
 
Join Date: Sep 2008
Posts: 14
Thanks: 1
Thanked 5 Times in 1 Post
brevco is on a distinguished road
Reputation: 15
Default Re: Multiple timeframe ribbons on one chart

Thank you, Kenneth.

Since I trade intraday, it would be great to have this for
range bars. This is definitely heading in the right direction
and it is probably the closest I've gotten to finding what I've
been searching for.

I can probably figure out how to convert this to minute
bars so it can be traded intraday, but I am still searching
for a way to convert it to range bars. This is beautiful
though.

I think this would be great to use for longer term
such as trading options....hopefully I'll get back into
that again soon.

Thanks again for responding and sharing this with me. I'm
getting closer!

Evelyn
Reply With Quote
  #8  
Old 18th November 2008, 05:30 PM
Member
 
Join Date: Jul 2005
Posts: 451
Thanks: 39
Thanked 56 Times in 32 Posts
kenneth will become famous soon enough
Reputation: 86
Default Re: Multiple timeframe ribbons on one chart

Hi Evelyn

Screen short for Intraday trading.

Rgards
Ken
Attached Images
File Type: png HDIL.png (24.9 KB, 42 views)
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +5.5. The time now is 09:28 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com