Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. 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

Last Five Trades Result Dashboard – AFL code

49 sec read

Here is simple visualization to look into the past five trades result and plot the values over the chart which gives a quick view on how the strategy performed in the last five trades. In this AFL example we had created the dashboard for simple MACD crossover. And the dashboard doesnt include current open positions and only include last five closed positions.

Nifty Futures Daily Charts
Nifty Futures Dashboard

[wp_ad_camp_5]

 
Here we are using equity function to generate realtime backtesting equity curve and from there we used BarIndex() feature to track back the Last Five trades Profit/Loss Results

To create your own Last Five Results Dashboard over your trading system you have to replace the sample MACD Buy/Sell/Cover/Short rules with your trading rules.

Download Last Five Trades Result Dashboard for Amibroker

Note :
1)PositonSize is set to 1 shares to get the exact profit/loss points
2)This AFL doesnt includes Slippages/Commissions and displays pure signal to signal profit/loss points
3)However you can include Slippages/Commissions in the Initial Values Section
4)Dont click on the chart this will create a vertical lines over the candlestick which will distort the values of dashboard
5)If you see such vertical lines or mistakenly clicked over the candlestick then double click over the vertical lines to remove it from the chart.

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. 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

Fisher Transform – Amibroker AFL Code

The Fisher Transform is a technical analysis indicator developed by John F. Ehlers, designed to identify potential turning points in the price movements of...
Rajandran R
2 min read

My Experience Converting SSL Hybrid from PineScript to Amibroker…

As a trader and coding enthusiast, I often find myself needing to translate trading indicators from one programming language to another. Recently, I embarked...
Rajandran R
8 min read

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
59 sec read

12 Replies to “Last Five Trades Result Dashboard – AFL code”

  1. hi

    how about McGinnly MACD versions and with his same setup?
    orginal coder did not post the tested result.
    i watched alexender Elder vedio,he took force/effort index (cnt remember properly ) to filter macD with SMAs combo setup(might be). MACD itself wont work i guess.

    thx

    1. HI,

      This is just a sample prototype to implement your own models to build your own trading system with last five trades dashboard. We are not talking about any sort of trading system here.

  2. Hi,

    It will be of great help if you can please include the target value along with the target line on the Supertrend signals (eod and intraday). Also, please include the target values for the 15 and 60 timeframe in the multi timeframe dashboard.

    Thank you,

    Veena

  3. Hello Rajandran,

    After checking this afl of yours, i have an idea, can you help me on this?

    Suppose if i have one minute data of two years of any one scrip in amibroker and i wish to see on my chart that what return MACD or any strategy gave in last one yr on five minute periodicity, so for that what needs to be done?

    Can it be possible?

    Put some light on this.

    Thank You,

    Mudit Agarwal

  4. Sir i want to buy this software ambibroker ….wer to contact ..n cn u tell me price of that

  5. hi,

    i need afl for display one month or presetting date total profit\Loss on chart?

    will you help me

    thanks
    Uma,
    Coimbatore

  6. Hi,

    I was checking the code and found out that in last 5 trades it is only showing results for buy signals? How to fix it to also show results for short signals?

    Thanks

    Rahul

  7. HI

    THIS IS WITH REGARDS TO THE LAST 5 TRADES CODES.

    I WANT THE TRADE RESULTS AND THE CORRESPONDING TIME WHEN IT HAPPENED.

    SO, COULD U PLZ ADVISE HOW AND WHAT TO ADD TO THE CODES?

    “\nTrade1= ” + PL1
    +”\n”+ “Trade2= ” + PL2
    +”\n”+ “Trade3= ” + PL3
    +”\n”+ “Trade4= ” + PL4
    +”\n”+ “Trade5= ” + PL5;

    ////////////////////////////////////////////////////////////////

    _SECTION_END();

    // Plot Candlesticks

    _SECTION_BEGIN(“Price”);
    SetChartOptions(0,chartShowArrows|chartShowDates);
    Plot( C, “Close”, ParamColor(“Color”, colorDefault ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
    _SECTION_END();

Leave a Reply

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