How to create and backtest AFL scripts in Amibroker?

How to create and backtest AFL scripts in Amibroker?

How to create and back-test AFL scripts in Amibroker?

 

AMIBroker is one of the most famous Algo-Trading Tools available in the market today, which uses AFL Scripting. We can use AMIBroker to create, back-test and deploy and strategy.

 

In today’s episode, we are going to see the following items:

  1. How to create a simple AFL script?
  2. How to plot the AFL script to the chart to generate buy and sell signals?
  3. How to analyse and back-test the AFL Script?
  4. How to find out net result of back-testing?

To watch this video, use the following link: https://youtu.be/keJ5ldLOPJA

 

Script used in this episode:

Buy = Ref(Close,-1)>Ref(Open,-1)
AND Ref(Close,-2)< Ref(Open,-2)
AND Ref(Open,-1)<Ref(Close,-2) AND Ref(Close,-1)>Ref(Open,-2);

Sell = Ref(Close,-1)<Ref(Open,-1) AND Ref(Close,-2)> Ref(Open,-2)
AND Ref(Open,-1)>Ref(Close,-2)
AND Ref(Close,-1)<Ref(Open,-2);

Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L,Offset=-10);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,Offset=-10);

 

To Download the script, use the following link: https://drive.google.com/file/d/1Z_ck4jQ-qpgMK2blYhWUD6s3O_XBzXCt/view?usp=sharing

To download the data files used in the video, use the following link: https://drive.google.com/file/d/1Weo6Tb1N6NX-J1OboZEHbRhcjMgNi0dV/view?usp=sharing

 

We have launched a new telegram channel for people who wants to Learn everything about AFL Programming from basics to advanced. In addition, we will share our own past data files and various other tools used for downloading data through our telegram channel.

To Join our telegram channel, use the following link: https://t.me/LearnAFL

 

If you have any issues or queries, please post it in the comments section. We will definitely answer it.

Please share if you find it useful.!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!