amibroker

HomeKnowledge Base

How to chart spreads?

To create a spread chart (and other multi-security indicators / statistics etc.) one can use FOREIGN function which allows to refer to other symbols than currently selected:

It’s necessary to do the following:
– Analysis -> Formula Editor
– enter the formula:


spread Foreign"ticker1""C") - Foreign"ticker2""C");
Plotspread"spread"colorRed); 

– Tools -> Apply Indicator
(replace ticker1, ticker2 with actual symbol names)

How to plot a trailing stop in the Price chart

In this short article we will show how to calculate and plot trailing stop using two different methods. (more…)

How to fill the area between two lines with a solid color

This example shows how to fill the area between Bollinger Bands with a solid color. (more…)

Calendar day index

Someone asked me recently how to count calendar days (not bars) that passed since first available quote. AmiBroker has a built-in function ( since version 5.20 ) that calculates the number of days that passed since January 1st, 1900. This function can be used to easily implement number of days since first available quote Here is a sample formula that shows how to do that. (more…)