Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Compare 2 Stocks for Amibroker (AFL)

Rating:
0 / 5 (Votes 0)
Tags:
amibroker, compare

This formula allows you to compare 2 stocks by plotting both on the same chart. Select the stock you want to compare to via params.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Compare 2 Stocks");

UpClose = Close - Ref(Close,-1); 
Color = IIf(UpClose > 0, colorGreen, colorRed); 
PlotOHLC(Open,High,Low,Close,"", Color, styleCandle); 

Ticker = ParamStr("Symbol", "VNINDEX" );
upcol = Foreign(Ticker,"Close") - Ref(Foreign(Ticker,"Close"),-1);
kol = IIf(upcol > 0, colorGreen, colorRed);

PlotOHLC(Foreign(Ticker,"Open"), Foreign(Ticker,"High"), Foreign(Ticker,"Low"), Foreign(Ticker,"Close"),"Ticker", kol, ParamStyle("Style", styleCandle)|styleOwnScale);
Title = " VTC - Compare 2 Stocks - " + EncodeColor(colorBlue) + FullName() + " - Date: " + Date() + " - O: " + O + " - H: " + H + " - L: " + L + " - C: " + C + " ( " +
(C - Ref(C,-1)) + " ) V: " + V + EncodeColor(colorBlack) + "\n vs: " + EncodeColor(colorRed) + Ticker + " - O: " + Foreign(Ticker,"Open")
+ " - H: " + Foreign(Ticker,"High") + " - L: " + Foreign(Ticker,"Low")+ " - C: " + Foreign(Ticker,"Close") + " - Vol: " + Foreign(Ticker,"Volume");

SetChartBkGradientFill( ParamColor("Top Colour", colorWhite),ParamColor("Bottom Colour", colorWhite));
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back