Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Absolute Monthly and Yearly Profit/Loss Table – Amibroker AFL Code

46 sec read

While designing strategies at our workplace one of our colleague asked “is it possible to get a Month on Month Profit/Loss table in Absolute value rather than in compounded percentage terms?”

while back-testing, by default Amibroker provides Profit Table in Compounded percentage terms. However the profit table can be customized according to ones requirement. Rather than doing a month on month back testing and recording the returns manually one can simply custom design the Profit Table to automate his requirement.

Amibroker stores the Profit Table Computation in 3.Profit Table under /formulas/reports folder. One can simply understand and tweak the afl to match his requirement.

Here is the simple AFL we built which brings Absolute Absolute Monthly and Yearly Profit/Loss Table. Values are scaled in thousands to remove excessive numbers from the profit table. so a 8.3 value needs to be interpreted as Rs8300/-

However one can change the parameter divider = 1000; in line number 3 to bring his own scale.

Steps to Install Profit Table

1)Download 4.Absolute Profit Table (in Thousands).zip

2)Unzip and copy the file 4.Absolute Profit Table (in Thousands).afl to the folder /amibroker/formulas/reports/

3)Now Run Backtest.

4)Go and check the Backtest reports where you will get Absolute Monthly and Yearly Profit/Loss Table as addon to your existing backtest report.

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

[Free Webinar] Starting Amibroker AFL Coding Right from the…

Interested in Creating your own indicators/Buy or Sell Trading System. Learn How to build your own trading system using Amibroker. If you are new...
Rajandran R
27 sec read

Angel Broking Multi-Client Amibroker Trading Module

Got frequent requirements from Angel Broking Customers to automate Amibroker based trading system where one single generation from charts could punch orders in multiple...
Rajandran R
6 min read

Option Button Trading to Trade ATM, ITM, OTM Options…

Here is a simple button trading module which can be used to send option trading order with buttons. Users can configure the button to...
Rajandran R
7 min read

7 Replies to “Absolute Monthly and Yearly Profit/Loss Table – Amibroker AFL…”

  1. Hi Rajandran, is there a way in which stocks can be scanned and ranked in terms of their absolutely monthly return %. Like rankng stocks with Max return in a selected timeperiod.

  2. Hi Rajandran
    I have been trying to run backtest for EURUSD in Amibroker to  compounds profit when account doubles but dont know where to start and which settings to use…For example , we are trading a $10,000 account with 1lot and the account doubles to $20,000 .So now we will trade 2lots in the $20,000 account and when $20,000 doubles to $40,000 we will trade 4lots and so on in that order.. So anytime we double the account , we increase the lot size by 2 ..How can I run this kind of backtest in Amibroker?Can anyone point me in the right direction please..I am quite sure this will help a lot of traders make more profit backtesting and trading their system since compounding profits in my opinion is what can grow an account exponentially when done right…I will be very glad if someone can point me in thee right direction.Thank you and green pips to you.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More