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.

How to use Amibroker to Parse the Position Book…

This is a simple tutorial that explains how to access the position book using Amibroker and get various details about the position book details...
Rajandran R
2 min read

Mini Certification Course on Algorithmic Trading Strategies

If you are new to Automated trading? This certification course will help you to kickstart your automated trading with your broker and get to...
Rajandran R
1 min read

Algomojo Index Straddle/Strangle Execution Module with Intraday Stoploss

This tutorial focus on how to automate your index straddle/strangle strategy with intraday stop-loss levels with time-based entry and exits using Algomojo Platform and...
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