Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

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 Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Line Trading – OpenAlgo Automation Module for Amibroker Users

The line Trading Automation tool is designed for Manual traders who want to perform level-based trade execution faster and also bring some advanced trade...
Rajandran R
55 sec read

Mini Certification Course on Algorithmic Trading

Welcome to the Mini Certification on Algorithmic Trading using Amibroker and OpenAlgo! This comprehensive 4-part series is designed to equip you with the knowledge...
Rajandran R
1 min read

Pivot Reversal Strategy – Tradingview Pinescript to Amibroker AFL…

Pivot Reversal Strategy is a popular in-built strategy in Tradingview Platform. Here I had attempted to convert the pinescript v5 to Amibroker AFL Code....
Rajandran R
3 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