Arrows above Price and volume bars for user defined dates

I am wondering in there is a way to place arrows or dots above price and volume bars on a daily chart.
I was thinking for dividends or earnings, so you could just install the dates of interest.
I was also thinking of a volume since the close of the date in question.
Since I have very little previous experience at this I would just like to hear others thoughts on if this can be accomplished in amibroker before I start to work on it.

Thanks in Advance Rob

@rstevens: Rob, as you read more posts and threads in the forum, you will learn that AmiBroker AFL is EXTREMELY POWERFUL AND FLEXIBLE.

Your idea of setting some dates and arrows above is similar to this thread: Put the arrow above the bar 14 days from today

Your situation may require a bit more work (Where is your data, how are you going to access/store it, is there more data that you want included?), but it is possible.

Start small, with the "How to use this site": How to use this site

Then move on to the debugging, and SEARCH Tool, and of course Google.

Give it a try, READ READ READ, then try some more. THEN post your code and tell us what is not working the way you think it should.


You might also find these threads interesting:


@rstevens welcome to the forum, and study the info provided by @snoopy.pa30 and @Milosz

Here is a basic start to plotting shapes on specific dates. I probably copied something like this off this forum but didn't keep track to properly credit the original author.

_SECTION_BEGIN( "Price Chart" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
_N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

dn = DateNum();
// July and August of 2016 have this format for DateNum
Condition1 = ( dn == 1160707 ) OR( dn == 1160714 ) OR( dn == 1160808 );
Condition2 = ( dn == 1160711 ) OR( dn == 1160728 ) OR( dn == 1160811 );

Plot( C, "Price", colorDefault, styleCandle );
PlotShapes( IIf( Condition1, shapeCircle, IIf( Condition2, shapeHollowStar, shapeNone ) ),
            IIf( Condition1, colorWhite, colorWhite ), 0,
            IIf( Condition1, H, L ),
            IIf( Condition1, 15, -15 ) );



Hi Rob,

In addition to what experts have shown, I would like to mention few helpful aspects. Before getting into Plotting shapes or anything, Understanding how AFL works is quintessential. One must also correctly differentiate Barindex and BarCount. Please view the below image taken from Quick AFL facts.


Next, it is important to understand Date, Time aspects w.r.t Plot (or for its derivative functions), for that please read and play with the code shown in this article Numbering Bars.

Then, please thoroughly go through Multiple Time Frame support in AFL in order to understand how you can compress/expand different TimeFrames to Plot. Copy/paste the codes onto AFL Editor and experiment with them - that's the best way to learn AFL. Moreover, it begins to become easy once the mind is put over the material. :smiley:

These concept will definitely give you a head-start, then, slowly you could vouch for smart shortcuts or deep concepts from other codes, posts, articles, websites, videos abundantly scattered across internet.

This is just the beginning. Amibroker is highly versatile, flexible, powerful......

Thanks for reading!