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

[amibroker] Re: Chart sheets and default display period



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxxx> wrote:

> For example I like to display the five components of a signal for
example 1) moving average cross over, 2) stochastic, 3) MACD of OBV,
4) MACD of Advancer Decliners, 5) Trend2 - that are coming from one
relatively long trading formula file. 

> Is there a functionality of AB that would make this smoother, but
one that is overlooked by me? 


Joe,

I regularly plot multiple indicators in a single pane to allow all
parameters to be selected from one box. I do this by using
StyleOwnScale with different paramenters for each indicator, as
demonstrated by the following code (watch out for line-wraps).

Bill

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

function LL1 (Variable, FreespacePercent)  // lower limit for plotting
one variable
{
	barpresent = Status("barvisible");
	Hii = LastValue(Highest(Variable*barpresent));
	Loo = LastValue(Lowest((Variable - Hii)*barpresent) + Hii);
	range = Hii - Loo;
	result = Loo - 0.01*FreespacePercent*range;
	return result;
}

function UL1 (Variable, FreespacePercent)  // upper limit for plotting
one variable
{
	barpresent = Status("barvisible");
	Hii = LastValue(Highest(Variable*barpresent));
	Loo = LastValue(Lowest((Variable - Hii)*barpresent) + Hii);
	range = Hii - Loo;
	result = Loo +  range / (1 - 0.01*FreespacePercent);
	return result;
}


Plot(C, "", 32, styleOwnScale, LL1(C, 290), UL1(C, 10));
Plot(EMA(C, 21), "", 42, styleOwnScale, LL1(C, 290), UL1(C, 10));

Plot(RSI(14), "", 55, styleOwnScale, LL1(RSI(14), 100), UL1(RSI(14),
45));

Plot(StochD(14, 3, 3), "", 43, styleOwnScale, LL1(RSI(14), 60),
UL1(RSI(14), 85));



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/