Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Performance Stats: real MAE and MFE ?
Collapse
X
-
Agreed on all counts, and you are evidently tracking it yourself already anyway, as am I.Originally posted by palinuro View Post
-
[QUOTE=koganam;445193 If one insists on treating a scale out trade as one trade based on the entry rather than as the logically multiple trades based on the exits, one then has to track all the scale outs until the initial entry would be flat from all the exits, and then take the relevant max values, only after the trade is flat, or alternatively track and evaluate that max value until the trade is flat.)[/QUOTE]
Yes, that's what Position MAE/MFE does - it's also a perfectly logical method. Without it you don't ever know the actual maximum risk of the position.
In any case, my point is that there are two ways of calculating MAE/MFE, and NT8 currently fails to do either unless you trade all-in all-out. It should do both. I have code for doing both for NT7, and I can obviously port it, but it seems to me correct calculations of such basic stats ought to be built in.
Moreover, as indicated in the examples from my last post, the MAE/MFE calculation is in any case mathematically wrong.
Leave a comment:
-
Actually it will. Those values are the max values of MAE/MFE while the trade was in effect, however one chooses to delineate the trade. If one insists on treating a scale out trade as one trade based on the entry rather than as the logically multiple trades based on the exits, one then has to track all the scale outs until the initial entry would be flat from all the exits, and then take the relevant max values, only after the trade is flat, or alternatively track and evaluate that max value until the trade is flat.That approach will of course give the price MAE/MFE for each contract, though there is no way of deriving the position MAE/MFE from the final per contract results.
Hence, in the example trade that I gave, the MAE would be 2 and the MFE would be 8. Truth to tell, that tells me nothing about the original 3 contract entry position. After all, in this particular case, when both MAE/MFE were met, there was only one contract in play, so why would I care about the 2 contracts that I had exited.
Regardless, the point really that I was making is that one may have to have to track this oneself for the simple reason that each of us determines how we see trades, and how we look at what is a drawdown. For example, it is perfectly valid to look at MAE/MFE to be the total at the time they are hit with however many contracts are still in play at any given time. That would change the arithmetic of the example that I gave, albeit, the results in that particular case would still show the same max values.
If you wish, I am perfectly willing to look at a more complex scale out example with you on here. I am sure that for those of us who are not trading geniuses who never lose, we shall all benefit from a deeper look at these ideas.
Thanks for forcing me to take another look at this whole question. I was not quite as done with it as I thought.
Leave a comment:
-
A direct result of using the entry as the delimiter of the trade, rather than the exits. If one uses the exits, then naturally, the number of trades is the number of exits, and calculations will, as I demonstrated, not adjust anything about the previous trade, that happened before the current exit.Once the trade is closed the stats for the first contract are recalculated based on what happened after the contract was exited. (i.e., the MAE for the first contract actually includes a further adverse excursion that occurred after that contract was closed out). The same goes for MFE.
Which, as my example clearly demonstrates, cannot happen if you use the trade exit as the trade delimiter, because calculations ignore, as they should, what happened to contracts that are exited before or after any other contract is exited. And to boot, it would be the only way to track per contract, as one is always only analyzing what happened to the most recent contract that was exited.Last edited by koganam; 01-23-2016, 12:22 PM.
Leave a comment:
-
See also this thread:Originally posted by shuglu View PostThe NT team are aware of the issues within their platform on this subject.
http://ninjatrader.com/support/forum...ad.php?t=78107
Leave a comment:
-
Which is what I'm saying...Originally posted by palinuro View Postkoganam, thanks for taking the time for the detailed example. That approach will of course give the price MAE/MFE for each contract, though there is no way of deriving the position MAE/MFE from the final per contract results.
I think..
Leave a comment:
-
koganam, thanks for taking the time for the detailed example. That approach will of course give the price MAE/MFE for each contract, though there is no way of deriving the position MAE/MFE from the final per contract results.
But while I'm sure we can all do it manually, or write our own code to do it, the idea is to have NT 8 do it automatically. And it doesn't actually do it that way either; you can't rely on its statistics even for individual contracts.
I did a quick example yesterday of a simple trade with 2 contracts. I scaled in, waited for price to wiggle around, exited 1 contract, waited for price to wiggle around some more, then exited the second.
I generated 2 performance reports (attached), one immediately after exiting the first contract, the second after closing the trade.
It looks from the final performance report as if NT treats each contract as a separate trade, but while that is true for the Profit, it isn't true for MAE/MFE. Once the trade is closed the stats for the first contract are recalculated based on what happened after the contract was exited. (i.e., the MAE for the first contract actually includes a further adverse excursion that occurred after that contract was closed out). The same goes for MFE.
So it doesn't provide accurate per contract statistics from any position involving scaling. (I did the same thing for an all-in scale-out trade, and got the same calculation problems.)
Also, both the MAE and the MFE stats are off by 1 tick (!). If I enter short at 1891.00 and price goes to 1892.00, that's 1.00 of heat, not 0.75. At least, that's what my broker thinks.
I don't know if there's much point in going on to discuss position MAE/MFE unless these problems are straightened out first.
Leave a comment:
-
The NT team are aware of the issues within their platform on this subject.
http://ninjatrader.com/support/forum...ad.php?t=78107
Leave a comment:
-
(emphasis mine).Originally posted by sledge View PostThat's the whole problem with it.
Entering 3 contracts as a trade unit, with exiting 3 is treated as 1 trade in NT.
If entering 3 as a trade unit, and exiting 2 at one level and 1 at another level - is treated as 2 trades.
If entering 3 as a trade unit, and exiting 1 at one level and 1 at another level, and 1 at another level is treated as 3 trades!!
If anything, all 3 should be treated as 3 trades.
If anything, I think I'd prefer 1 trade, with the average price of the 3 used on exit.
That is actually the logical truth, and it takes care of all intra trade movements, if tracked by exit.
Let us take the most likely scenario: 1 (apparent entry) of 3 contracts, 3 exits of one each, at different prices.
Let us then postulate some price movement and the trade, and we shall see why tracking by exit takes care of every measure.
3 contracts long at 1000. (nice round numbers).
1. Price goes directly to 1003.
Exit one contract.
MFE = 3
MAE = 0
on the contract we exited. We have not exited any other, so we do not calculate. The trade on the other 2 contracts is still on, so we do not yet know the final measures.
2. Price goes to 1005, then retreats to 999, then comes back to 1006.
We exit another contract.
MFE = 6
MAE = 1
on that one contract.
3. Price goes to 1008, then retreats to 998, then goes back to 1005, and we exit the last contract. (Reversal condition, trailing stop, whatever).
MFE = 8
MAE = 2
on one contract.
All because we track and calculate each trade only after it exits, so we can tell the travel for that particular contract, regardless whatever happened to any other contract. If the scaleouts are multiple contracts, then multiply with the appropriate quantity before the averages etc.,
Please ignore if anyone would hold over such a large drawdown:
I am just illustrating the principle. 
In any case, regardless the numbers, that is how I think and believe that trade statistics should be tracked, which is why my autotraders all do it that way, in the code.
palinuro, this was an example of the manual arithmetic that I was talking about. I just did not have enough time when writing that earlier post.Last edited by koganam; 01-22-2016, 01:10 PM.
Leave a comment:
-
That's the whole problem with it.Originally posted by koganam View PostRun an example using manual arithmetic. you will see why it IS automatically handled. After all, the trade is only complete when it is exited. No matter our preference, as far as the funds are concerned, the trade is made up of the exit which followed the entry, and the quantity thereof.
And if you want accurate results, you are going to have to track it as the trades develop. This has been a somewhat long-standing complaint until now.
ref: http://ninjatrader.com/support/forum...int#post443464
Entering 3 contracts as a trade unit, with exiting 3 is treated as 1 trade in NT.
If entering 3 as a trade unit, and exiting 2 at one level and 1 at another level - is treated as 2 trades.
If entering 3 as a trade unit, and exiting 1 at one level and 1 at another level, and 1 at another level is treated as 3 trades!!
If anything, all 3 should be treated as 3 trades.
If anything, I think I'd prefer 1 trade, with the average price of the 3 used on exit.
Leave a comment:
-
Tracking based on exit quantity is certainly something to think about. We would have to consider any downstream effects (how do we handle the second, third exits tied to the same entry? etc.), but I will note the suggestion to look further into it. (SFT-1079)Last edited by NinjaTrader_DaveI; 01-22-2016, 12:00 PM.
Leave a comment:
-
Run an example using manual arithmetic, and you will see why it IS automatically handled. After all, the trade is only complete when it is exited. No matter our preference, as far as the funds are concerned, the trade is made up of the exit which followed the entry, and the quantity thereof.Originally posted by palinuro View PostThanks for the idea, but I don't think so, it would just give a different error, equally misleading for understanding position MAE/MFE.
It really needs to be tracked properly through the life of the trade.
And if you want accurate results, you are going to have to track it as the trades develop. This has been a somewhat long-standing complaint until now.
ref: http://ninjatrader.com/support/forum...int#post443464Last edited by koganam; 01-22-2016, 01:02 PM.
Leave a comment:
-
Thanks for the idea, but I don't think so, it would just give a different error, equally misleading for understanding position MAE/MFE.Originally posted by koganam View PostMaybe you should be using the Exit quantities instead. That automatically takes care of the logic of scaling out.
It really needs to be tracked properly through the life of the trade.
Leave a comment:
-
Maybe you should be using the Exit quantities instead. That automatically takes care of the logic of scaling out.Originally posted by NinjaTrader_Dave View PostThank you for clarifying. When calculating the base MAE (before calculating the average MAE), each trade is broken into an entry execution and an exit execution. It is the quantity of the entry execution, specifically, which is used to calculate the MAE by trade.
Does that fit in line with what you would expect? If not, I'll be happy to save any notes you have on how to adjust the formula, and log them as a feature request.
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, Today, 06:46 AM
|
0 responses
13 views
0 likes
|
Last Post
by Mindset
Today, 06:46 AM
|
||
|
Started by M4ndoo, Yesterday, 05:21 PM
|
0 responses
19 views
0 likes
|
Last Post
by M4ndoo
Yesterday, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
16 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
82 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
51 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Leave a comment: