Multiple timeframe ribbons on one chart

#11
in AB the time scale is fixed. creating range bars means you have to have a chart with different time scale compression for each bar. This is not possible in AB. I think the only thing we can do is to have an exploration to create the bar data with time stamp and export this data to excel for creating a chart.
Hello,

Implementation of N-range bars in AmiBroker is possible. For correct representation of range bars, you need to use TICK data as input, not compressed bars.

Registered AmiBroker users can contact us and we can give them more inputs about how this can be achieved in AmiBroker.

Best regards,

AmiBroker-India
 

AMITBE

Well-Known Member
#12
Preferences then Intraday.
Custom N-ticks/N-volume/range chart settings. (lower half of settings window)
From the drop down menu select R - $ range.

This will set up the range bar chart in Ami.

It works better with tick data. Even so, there is often an over run. Meaning if you set the $ range as 10, not every bar will have an exact 10 point range. But close enough to be effective.

Also these settings have changed in different versions of Ami.
 

karthikmarar

Well-Known Member
#13
Hello,

Implementation of N-range bars in AmiBroker is possible. For correct representation of range bars, you need to use TICK data as input, not compressed bars.

Registered AmiBroker users can contact us and we can give them more inputs about how this can be achieved in AmiBroker.

Best regards,

AmiBroker-India
mmmm.... Could be possible with tick data....

But can't help much here as the vendor is not ready to provide the details of the features of his product here... :p
 
#15
mmmm.... Could be possible with tick data....

But can't help much here as the vendor is not ready to provide the details of the features of his product here... :p
Hello,

I want to discourage usage of pirated AmiBroker as much possible and hence I would be asking users to contact us over to our Support email when they have some specific how to type of query (like this one) so that I can check their genuineness before sending them answers. Else, everyone will start using cracked versions if they get the help they want on such public forums. However I answer all those queries which are about general features of AmiBroker. I hope you are getting my point.

Best regards,

AmiBroker-India
 

kenneth

Well-Known Member
#17
Hello,

I am not sure whom are you talking about. I think you misinterpreted previous message from karthikmarar. All those who contacted us over email got the answers to their queries on this topic.

Best regards,

AmiBroker-India
Thanks You. I did post a message then thought I misinterpreted Kathik's message. Sorry the fact is I am not a registered user.

Regards
Ken
 

casoni

Well-Known Member
#18
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|styleNoLabel,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|styleNoLabel,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|styleNoLabel,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|styleNoLabel,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
HELLO ;
KENNETH PLEASE USE NEW / CORRECTED & IMPROVED VERSION,
Thank you
* its posted on this thread
 

casoni

Well-Known Member
#19
Hello all ,
here is the corrected version of HAS multi time frame,

/*1. Here are some observations to keep in mind that will help assure
you are in a good trending move which is detrimental to the success
of the trade moving higher before the inevitable over exhausted trend.

2 Consider only going long on the 5M if the 30M (two rows above) is also blue.

3 Consider the 1hr row as well being blue since it has an effect too.

4 The 15M row has to be blue with NO exceptions

5 The 30M row if blue has less effect on the trade as compared to the 15M row
but keep this in mind. The 30M row being blue helps the 15M row continue to stay blue.

6 The 1hr row has even less effect OR importance but it too keeps the 30M
from weakening to some minor degree.
*/
// Define label bar (x) position location

SetChartOptions(0,chartShowArrows|chartShowDates);
gxs=Param("GRAPH spaceing",10,5,50,5);
GraphXSpace = gxs;

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);
Plot(C,"",IIf(O>=C,colorLime,colorOrange),1|styleOwnScale);
_SECTION_BEGIN("default");
HaClose =(O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotText(":"+Interval(2), textoffset,40.478, formatChar,1);
Color = IIf( Haopen > Haclose,4, IIf( HaHigh < HaLow,colorYellow, 6));
Plot(10,"", Color, styleHistogram+styleThick|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 10.5,"",1,styleOwnScale|styleArea|styleNoLabel,0, 100 );
event1=Haopen < Haclose;
event2=Haopen > Haclose;
_SECTION_END();

_SECTION_BEGIN("2");
Compress2= Param("Compression",2,2,4,1);
TimeFrameSet(Compress2* Interval());
HaClose2 =(O+H+L+C)/4;
HaOpen2 = AMA( Ref( HaClose2, -1 ), 0.5 );
HaHigh2 = Max( H, Max( HaClose2, HaOpen2 ) );
HaLow2 = Min( L, Min( HaClose2, HaOpen2 ) );
PlotText(":"+Interval(2), textoffset,40.525,formatChar,1);
TimeFrameRestore();
HAopen2f=TimeFrameExpand( Haopen2, Compress2* Interval());
Haclose2f=TimeFrameExpand( Haclose2, Compress2* Interval());
HaHigh2f=TimeFrameExpand( Hahigh2, Compress2* Interval());
HaLow2f=TimeFrameExpand( Halow2, Compress2* Interval());
Color2 = IIf( Haopen2f > Haclose2f,4, IIf( HaHigh2f < HaLow2f,colorYellow, 6));
Plot(20,"", Color2, styleHistogram+styleThick|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 20.5,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
event1a= Haopen2f < Haclose2f;
event2a=Haopen2f > Haclose2f;
_SECTION_END();
_SECTION_BEGIN("3");
Compress3= Param("Compression3",4,4,100,1);
TimeFrameSet(Compress3* Interval());
HaClose3 =(O+H+L+C)/4;
HaOpen3 = AMA( Ref( HaClose3, -1 ), 0.5 );
HaHigh3 = Max( H, Max( HaClose3, HaOpen3 ) );
HaLow3 = Min( L, Min( HaClose3, HaOpen3 ) );
PlotText(":"+Interval(2), textoffset,40.577, formatChar,1);
TimeFrameRestore();
HAopen3f=TimeFrameExpand( Haopen3, Compress3* Interval());
Haclose3f=TimeFrameExpand( Haclose3, Compress3* Interval());
HaHigh3f=TimeFrameExpand( Hahigh3, Compress3* Interval());
HaLow3f=TimeFrameExpand( Halow3, Compress3* Interval());
color3 = IIf( Haopen3f > Haclose3f,4, IIf( HaHigh3f < HaLow3f,colorYellow,6));
Plot(30,"", Color3, styleHistogram+styleThick|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 30.5,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
event1b= Haopen3f < Haclose3f;
event2b=Haopen3f > Haclose3f;
_SECTION_END();
_SECTION_BEGIN("4");
Compress4= Param("Compression4",8,8,500,10);
TimeFrameSet(Compress4* Interval());
HaClose4 =(O+H+L+C)/4;
HaOpen4 = AMA( Ref( HaClose4, -1 ), 0.5 );
HaHigh4 = Max( H, Max( HaClose4, HaOpen4 ) );
HaLow4 = Min( L, Min( HaClose4, HaOpen4 ) );
PlotText(":"+Interval(2), textoffset, 40.63, formatChar,1);
TimeFrameRestore();
HAopen4f=TimeFrameExpand( Haopen4, Compress4* Interval());
Haclose4f=TimeFrameExpand( Haclose4, Compress4* Interval());
HaHigh4f=TimeFrameExpand( Hahigh4, Compress4* Interval());
HaLow4f=TimeFrameExpand( Halow4, Compress4* Interval());
Color4 = IIf( Haopen4f > Haclose4f,4, IIf( HaHigh4f < HaLow4f,colorYellow, 6));
Plot(40,"", Color4, styleHistogram+styleThick|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 40.5,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
event1c= Haopen4f < Haclose4f;
event2c=Haopen4f > Haclose4f;
_SECTION_END();

Buy = event1 AND event1a AND (event1b OR event1c);
Sell= event2 AND event2a AND (event2b OR event2c);

Buy=ExRem (Buy,Sell);Sell=ExRem(Sell,Buy);
PlotShapes(shapeSmallCircle*Buy, colorGreen,0,40.7);
PlotShapes(shapeSmallCircle*Sell, colorRed,0,40.7);


Title = EncodeColor(colorWhite)+ "Heinkin MTF " + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
" - " + Date() +" - "+
EncodeColor(31)+("\nPrice: ")+" Op-"+O+" "+" Hi-"+H+" "+" Lo-"+L+" "+"Cl-"+C+" "+ "Vol= "+ WriteVal(V)+ " "+
WriteIf(C>Ref(C,-1),EncodeColor(colorLime)+"Price-UP",EncodeColor(colorOrange)+"Price-Down")+"\n"+
EncodeColor(31)+("Heinkin: ")+"Op-"+HaOpen+" "+"Hi-"+HaHigh+" "+"Lo-"+HaLow+" "+"Cl-"+HaClose+" "+ "Vol= "+ WriteVal(V)+" "+
WriteIf(haOpen<haClose,EncodeColor(colorBlue)+"Heinkin-UP",EncodeColor(colorRed)+"Heinkin-Down");

thank you,
**sorry.... it took me long time to correct this afl..
 

Similar threads