Today you are going to learn how to add AFL code in Amibroker. In this tutorial, I am going to show you the easy steps to start using the software.
Here are the things you need to do in Amibroker to add the AFL code.
- Prepare the code
- Create a new blank chart
- Click the new analysis window
- Click edit
- Click the plus sign
- Paste the AFL code
- Verify Syntax
- Hit Apply or send to Analysis window
After you learn this, you will love Amibroker in stock trading because the software is so useful and powerful.
You can scan the best stocks in the market to improve your stock selection. Also, you can backtest a strategy to know if it is reliable.
In this Amibroker coding tutorial, you’ll master the basics of adding the AFL code to use the software properly.
Well, you can connect Amibroker on real-time or offline data to explore thousands of companies.
In the past, only big institutions can afford trading tools to gain an unfair advantage in the markets, but now, a small trader can do it also.
Amibroker is not only a scanner in the stock market, yet, it is also a back tester.
You can go to our screeners above to see the power of the software.
I have shared it for free on that page so that you can use it.
However, if you do not have a trading strategy in trading, you would not be able to use the full potential of Ambroker.
I recommend that you go to our recommended page if you are looking for a strategy. On the contrary, if you already have it, you can continue reading below.
In this tutorial, I will not explain the AFL code because I have covered that in another post.
I hope that you will learn something in this post today so that you can use it going forward.
You can watch a video in here to see it in action.
1. Prepare the code
First, you need to learn the syntax of an AFL code in Amibroker to avoid a lot of errors. However, you can search online on Google to get some examples.
I will not teach you to code in this post because that will be in another topic. You can go to our screener page above to look for some AFLs.
For example, if you want to plot the highest price in the last five days, you can use this code.
Well, you can clearly see that the AFL is easy to write in Amibroker.
In this Amibroker AFL code examples, you can write complex codes with only one line to do what you need.
Most trading tools require too much time to code, and you might be confused in the end, so you give up on the software.
Can you see how easy it is?
Before trading stocks, I was trading in the Forex exchange markets, but I had a hard time coding the MT4 scripts.
Ten lines of code in Metatrader is equivalent to only one line in Amibroker. Can you see the difference?
However, you can use Amibroker in the Forex market also. Now, this can get interesting because coding Amibroker AFL is so easy.
Well, you need to connect to Forex realtime data to use the software.
I’m not going to teach you the steps in this post to focus on our topic today.
If you do not have an AFL code, you can always search Google.
Of course, you can find a lot of sources, but you have to be careful because most are unreliable.
The best thing to do is backtest it with Amibroker to see if the AFL code is helpful.
Okay, let’s go to the next step to continue.
2.Create a new blank chart
Next, create a new blank chart in Amibroker to make the chart clean and straightforward. The crowded screen can often confuse you because there are so many distractions.
I keep my charts clean in Amibroker to see the price action correctly.
Nial Fuller do not even use a technical indicator in his trading to avoid having a distorted view of the Market.
Well, he is right in his ideas, but for me, using some tools can help you in the market to trade correctly.
In stock trading, I use Amibroker, but I use only a few. You can search our website about “ what technical analysis do you use?”
These are the reasons why he does not use trading indicators.
- First hand versus second-hand data
- Leading and lagging Indicator
- Clean charts versus messy charts
- Clarity (Source)
After reading his post, he does use some technical indicators in his trading to detect trends, but only a few like me.
You can’t just look at the price in the charts to find good trades.
Also, you need to determine whether there is a trend or consolidation in the stock market to be profitable.
Lagging indicators can destroy your trading account in consolidating markets, according to Nial in that post.