Skip to main content

Horizontal Live Priceline Tool for Amibroker (AFL)

northstar over 14 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 6)
  • Tags:
    amibroker

It’s a simple but very useful tool to give you a quick view of the current price of the stock in a horizontal priceline.
I find it particularly useful in live charts with Heikin Ashi Candles. Just add it to any live chart and see the difference.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Price Line");

PriceLineColor=ParamColor("PriceLineColor",ColorRGB(82,82,82));
PriceLevel = ParamField("PriceField", field = 3 ); 

Daysback    = Param("Bars Back",100,10,500,1); 
FirstBar    = BarCount - DaysBack; 
YY          = IIf(BarIndex() >= Firstbar,EndValue(PriceLevel),Null); 

Plot(YY,"Current Price",PriceLineColor,ParamStyle("LineStyle",styleLine|styleDashed|styleNoTitle|styleNoLabel|styleThick,maskAll)); 


side = Param("side",1,0,1000,1);

dist = 0; 

for( i = 0; i < BarCount; i++ ) 
{ 
 if(i+side== BarCount) PlotText( "\n    " + PriceLevel[ i ], i, YY[ i ]-dist[i], colorLightBlue ); 
} 


_SECTION_END();

5 comments

3. pully50
over 14 years ago

can u please give me your contact number to discuss something else on formula

almost 12 years ago

Very handy tool…just like inn MetaTrader ! Thanks for sharing !

almost 12 years ago

accuracy of price line is nice and logical thanks for nice sharing

Leave Comment

Please login here to leave a comment.