Yes, that works. It is attractive because of its simplicity. However, every
time that you have multiple indicators (essentially creating borderless mini
panes inside a single pane) the RHS is useless for either or both of the
indicators. To make matters worse there is no way (at least I haven’t found
one) to remove the scale and just have the tick marks. In this case the RHS
is correct for price, but not for RSI. In addition, the top curve is
significantly flattened and typically will run (bleed over) into the lower
indicator. To prevent bleed over into the lower indicator use an adjustable
adjfactor (see code below). However, since GraphXSpace creates space at the
top as well as on the bottom the top indicator will still be compressed.

 

I have an afl that not only automatically adjusts, but also doesn’t suffer
from top indicator compression. It also allows continuous adjustment of the
height ratio of the two indicators. However the RHS remains useless. I have
to find it amongst the hundreds of indicators. If and when I find it I will
post it.

 

I have spent/wasted a considerable amount of time on multiple indicators in
a single pane and have concluded that apart from the annoying separation
strip between two adjacent panes, plotting in separate panes is most of the
time preferable.

 

// same as before, but with adjfactor added

Title = EncodeColor(4)+ _DEFAULT_NAME()+";  "+EncodeColor(1) +
StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g
(%.1f%%) 
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ); 
// several zones in a pane to divide an indicator pane into several zones 
AdjFactor=Param("AdjFactor",5,0,10,0.25); 
Plot(C,"Price",colorBlack,styleCandle ); 
indicator="RSI"; 
R = RSI(); 
PH = 20; // Height of RSI in percent pane height 
RSIHeight = 100/PH*100; 
GraphXSpace =AdjFactor*PH; 
//Plot(70,"",colorBlack,styleLine|styleOwnScale,0,RSIHeight); 
Plot(R,"",4,1|styleOwnScale,0,RSIHeight); 
Plot(30,"",colorBlack,styleOwnScale|styleLine,0,RSIHeight); 
Plot(70,"",colorBlack,styleOwnScale|styleLine,0,RSIHeight); 
Plot(100,"",colorLightGrey,styleArea|styleOwnScale|styleNoLabel,0,RSIHeight)
;

 

 

From: [email protected] [mailto:[email protected]] On Behalf
Of reinsley
Sent: Monday, April 19, 2010 4:04 AM
To: [email protected]
Subject: Re: [amibroker] Multiple Indicators

 

  

Hi,

I don't remember the author, but the topic is recent.in the User's list.

BR

// several zones in a pane 

// to divide an indicator pane into several zones 


Plot(C,"Price",colorBlack,styleCandle); 

indicator="RSI"; 

R = RSI(); 

PH = 20; // Height of RSI in percent pane height 

RSIHeight = 100/PH*100; 

GraphXSpace = 5*PH; 



Plot(70,"",colorBlack,styleLine|styleOwnScale,0,RSIHeight); 

Plot(R,"",4,1|styleOwnScale,0,RSIHeight); 

Plot(30,"",colorBlack,styleOwnScale|styleLine,0,RSIHeight); 

Plot(100,"",colorLightGrey,styleArea|styleOwnScale|styleNoLabel,0,RSIHeight)
; 


Le 18/04/2010 16:50, JEFF F a écrit : 

  

Can anyone tell me how to plot multiple indicators using a primary and
secondary axis. One indicator is the closing price, and the second indicator
could range from -5 to +5. I want to see both of them relative to each
other.

 



Reply via email to