[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: CAN I HAVE RSI.OBV,Bollinger Band on same window of PRICE chart?



PureBytes Links

Trading Reference Links

Hi Keith 

Tried tweaking formula,as suggested, but price bars get squeezed.Am I
missing something?

Pl. help me in overcoming this huedel

Bharat--- In amibroker@xxxxxxxxxxxxxxx, "bharat"
<bharat_parth2005@xxx> wrote:
>
> Hi Keith,
> 
> Thanx for prompt feedback.I had "borrowed' this AFL from a friend 
> 
> SECTION_BEGIN("rsi");
> rs = ParamToggle("INDICATORS", "Hideen|Show",0); 
> pr=Param("RSI per",9,3,20,1);
> Obl=Param("OB",70,65,50,80,5);
> OSl=Param("OS",30,25,50,20,5);
> _SECTION_BEGIN("BB");
> Periods = Param("Periods", 9, 2, 100, 1 );
> Width = Param("Width", 1, 0, 10, 0.05 );
> Color = ParamColor("Color", colorCycle );
> Style = ParamStyle("Style");
> 
> _SECTION_BEGIN("");
> SetChartBkColor(  ColorHSB( 42, 42, 62 ) );
> GfxSetOverlayMode(1);
> GfxSelectFont("Tahoma", Status("pxheight")/6 );
> GfxSetTextAlign( 6 );
> GfxSetTextColor( ColorHSB( 42, 42, 82 ) );
> GfxSetBkMode(0); // transparent
> GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
> GfxSelectFont("Tahoma", Status("pxheight")/12 );
> GfxTextOut( " RSI+OBV+BB ", Status("pxwidth")/2, Status
> ("pxheight")/3 );
> GfxSelectFont("Tahoma", Status("pxheight")/36 );
> GfxTextOut( "Chart by CAS", Status("pxwidth")/2, Status
> ("pxheight")/2 );
> if (RS == 1) 	
> {
> r = RSI(PR) ;
> Plot( r, "RSI", 13, 1|styleLeftAxisScale );
> Plot( Obl, "OB", 31, 1|styleLeftAxisScale+styleNoLabel );
> Plot( OSl, "OS", 31, 1|styleLeftAxisScale+styleNoLabel );
> Plot(OBV(),"OBV",47,styleLine|styleOwnScale );
> Plot( BBandTop( C, Periods, Width ), "BBTop" , 4, 1+styleNoLabel );
> Plot( MA( C, Periods), "MID" , 4, 1+styleNoLabel );
> Plot( BBandBot( C, Periods, Width ), "BBBot" , 4, 1+styleNoLabel ); 
> }
> Plot( C, "",colorGrey40,64);
> //Formula used in expert for +ve diversion(Buy WATCH) 
> Buy=Cover=((( RSI(pr) >= HHV(RSI(pr),14)) OR ( (RSI(pr) >= HHV(RSI
> (pr),14) AND Close < HHV(Close,14)) OR 
> ((Close <= LLV(Close,14) AND RSI(pr) > LLV(RSI(pr),14)))))) AND ((( 
> OBV() >= HHV(OBV(),14)) OR 
> ((OBV() >= HHV(OBV(),14) AND Close < HHV(Close,14)) OR ((Close <= LLV
> (Close,14) AND OBV() >LLV(OBV(),14)))))) 
> AND ((RSI(pr) < 30)) ;
> //Formula used in expert for -ve diversion(Sell WATCH) 
> Sell=Short=(( RSI(pr) <= LLV(RSI(pr),14)) OR ((Close >= HHV
> (Close,14) AND RSI(pr) < HHV(RSI(pr),14)) OR 
> ((RSI(pr) <= LLV(RSI(pr),14) AND Close > LLV(Close,14))))) AND ((RSI
> (pr) > 70)) AND 
> ((( OBV() <= LLV(OBV(),14)) OR ((Close >= HHV(Close,14) AND OBV() < 
> HHV(OBV(),14)) OR 
> ((OBV() <= LLV(OBV(),14) 
> AND Close > LLV(Close,14)))))); 
> 
> 
> Cond1=O>BBandTop( C, Periods, Width );
> Cond2=O<BBandBot( C, Periods, Width );
> Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
> PlotShapes(Buy*shapeUpArrow,colorGreen,0,L,-15);
> PlotShapes(Sell*shapeDownArrow,colorRed,0,H,-15);
> Filter=Buy OR Sell OR Cond1 OR Cond2 OR GapUp() OR GapDown();
> AddColumn(Cond1, "Above Top[9-1]", 1,IIf(Cond1,colorRed,colorWhite));
> AddColumn(Cond2, "Below Bot[9-1]", 1,IIf
> (Cond2,colorGreen,colorWhite));
> AddColumn(GapUp(), "GAPUP", 1,IIf(GapUp(),colorRed,colorWhite));
> AddColumn(GapDown(), "GAPDN", 1,IIf(GapDown(),colorRed,colorWhite));
> AddColumn(IIf( Buy, 66, 77 ), "BUY", formatChar ,colorWhite,IIf
> (Buy,colorGreen,colorWhite));
> AddColumn(IIf(Sell, 83, 77 ), "SELL", formatChar ,colorWhite,IIf
> (Sell,colorRed,colorWhite));
> 
> _N( Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: " + _DEFAULT_NAME() 
> + " : {{OHLCX}} {{VALUES}}"
>  );
> 
> But I discarded  it as plotting of RSI along with price cluttered 
> price chart due to different values of price and RSI.When I plot 
> them in Metastock,there is no clash between Price and RSI or OBV as 
> RSI has scale on left side of Y AXIS,OBV is overlayed without 
> scale,and scale on right indicates values of price.Pl. make suitable 
> changes in this AFl so that chart becomes pleasing to eye as is in 
> metastock.
> 
> Bharat --- In amibroker@xxxxxxxxxxxxxxx, Keith McCombs 
> <kmccombs@> wrote:
> >
> > Yes you can do it.
> > Just add a plot() function for each.  However, for RSI and OBV you 
> will 
> > want to add '|*styleOwnScale*|' to the style specification.  For 
> > example, see how volume is done in charts>basic charts>Price (all 
> in one).
> > 
> > I don't believe there is any way of labeling the y-axis with the 
> values 
> > for any indicator the uses '|*styleOwnScale*|', though.
> > 
> > However, may I suggest that instead you use 3 separate charts.  If 
> you 
> > don't want the dates displayed in all three, then to turn off date 
> > displays, right click in chart, select parameters>axis and grid, 
> and 
> > change "show date axis" to No.
> > 
> > -- Keith
> > 
> > bharat wrote:
> > >
> > > I like to have RSI,OBV and BB on price chart window,as I do not
> > > prefer any of them in seperate sheet or not even seperate window
> > > because it is easier to relate them to price action.Can I do it 
> in
> > > Amibroker?How?
> > >
> > >
> >
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/