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.

Last Five Trades Result Dashboard – AFL code

47 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

 
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 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 Automate your Strategy just by Adding Two…

Since the start of Algomojo, we are focusing on one thing how to simplify the Automated Execution controls so that traders can easily convert...
Rajandran R
2 min read

[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

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