How To Write Simple Amibroker Buy Sell Indicators?

In my previous content, I wrote aboutĀ Simple AFL Code Writing. There I gave a guidance on how to create a buy-sell signal on your own. Today, we are going to discuss one of the easiest topics based on Amibroker Buy-Sell indicators. As you know in Amibroker, there is a customizable facility available for traders. That means, traders can customize, modified or create certain instructions by applying codes. There is a separate formula editor window where Amibroker user can put their own formula to create an indicator. Hence, today we will cover the process to write Simple Amibroker Buy Sell Indicators.

Today, we will work on an MA or MovingĀ Average. It is a momentum oscillator, builds a correlation between price and MA. In Amibroker, you can find varieties of charting tool option along with customizable benefit. In order to create a buy-sell signal, you need to follow certain steps and procedure which are described below:

How To Write Simple Amibroker Buy Sell Indicators

There are two possible ways by which traders can create their own signals and indicators. One is drag and drops way and the other is by writing an individual formula. Today we will cover the second one. In order to make the topic more prominent, I attach an image of Amibroker AFL buy-sell signal, created by me.

amibroker buy sell indicators

The above chart is on MA (Moving Average), based on a daily chart. The signal I have created, that indicates if MA crosses above 200 level, the trend is bullish while below 200 considers as bearish. The formula is attached below:

Amibroker AFL

Join Our Team For Rocket Calls

As you can see in the above screenshot, the formula is on the buy-sell signal. You can write down your own formula in the formula editor option. In case, if any mistake happens while writing down a formula, it will give you an error signal so that you can understand your mistake.

The process is quite easy. You just need to be comfortable in creating your own formula. If you want you can copy the formula from below:

_N(Title = StrFormat(“{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}”, O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, ParamColor(“Color”, colorDefault ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-25);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-35);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-30);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=25);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=35);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-30);

Indrajit is a professional blogger and trading system developer. Amibroker expert, WordPress expert, SEO expert and stock market analyst.Trading since 2002, he has started the journey of on 2008. He follows Indian and world stock markets closely.

Categories: Amibroker

Tags: , , , , , , , , , ,

2 replies

  1. respected sir..when time frame is change moving avg.level also it possible when i change MA timeframe(1day to 15min)MA value is same for all timeframe(1day,15min,5min)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do you want at least RS. 5000 PROFITS EVERYDAY?YES, I WANT