How to plot daily High and Low on intraday chart
The AFL offers a set of time-frame functions which allow to use multiple intervals within a single formula (the topic is explained in details in the following tutorial chapter:...
View ArticleUsing loops with TimeFrame functions
AmiBroker features a powerful set of TimeFrame functions that allow combining different time intervals in single system formula. There is one aspect of TimeFrame functions that is important to...
View ArticleHow to add full name to the Price chart title
The full name of the security can be retrieved in AFL using FullName() function. In order to add such information to the built-in Price chart, we need to do the following: Click on the chart with right...
View ArticleDrawing indicators on a subset of visible bars
By default, the Plot function draws the graph for all visible bars. In some situations however, we may want to draw some selected bars, leaving remaining chart space unaffected. To achieve that – we...
View ArticleHigh-Low of certain hours of the day
When we want to calculate high / low of selected hours of the trading session (e.g. first two trading hours), we can refer to TimeNum() function to identify timestamps of the bars. Then with use of...
View ArticlePositioning area plots behind the grid lines
When we want to paint the background with custom colors to indicate certain states or conditions – we can use area plots style for this purpose. The code example presented below shows green background...
View ArticleHow to increase maximum periods of built-in indicators
Built-in indicators and averages which are shipped with AmiBroker use Param() function calls to provide the ability to adjust parameter values through Parameters window. Param function in the code...
View ArticleHow to execute part of the formula only when new bar is added
In realtime conditions we may be interested in executing some parts of our formula only once per bar, when a new bar is created (e.g. for auto-trading purposes or just for notification). To do that –...
View ArticleAdding custom grid levels to RSI indicator
Built-in RSI indicator offers the ability to display one of predefined grid levels to indicate oversold and overbought regions. This can be done in Axes&Grid tab of Parameters window available...
View ArticleHow to read highest high value of future bars
Built in HHV and LLV functions allow to read highest high or lowest low of n-past bars. If we want to refer to future values, there is an easy way to do it using simple Ref function and just shift HHV...
View Article