Rajandran R FollowTelecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. 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

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

[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.

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.

Related

Rajandran R FollowTelecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...

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

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

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.

hi
i hav jst read http://www.marketcalls.in/amibroker/last-five-trades-result-dashboard-afl-code.html
its good but it can become superb if you code signal if consistent 3 Stoplosses occur and at that point system give buy or sell signal.
every one have their own trading style and accordingly trading systems.
if you can do this this will be great help.
thanx

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

Thanks for the nice code!

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?

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

hi,

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

will you help me

thanks
Uma,
Coimbatore

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

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?

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

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.

hi

i hav jst read http://www.marketcalls.in/amibroker/last-five-trades-result-dashboard-afl-code.html

its good but it can become superb if you code signal if consistent 3 Stoplosses occur and at that point system give buy or sell signal.

every one have their own trading style and accordingly trading systems.

if you can do this this will be great help.

thanx

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

Thanks for the nice code!

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

Try this one out How to Plot the Equity Curve without Backtesting?

sir

last five signal how scan or expolaration

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

hi,

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

will you help me

thanks

Uma,

Coimbatore

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

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();