Topic: Statistics Average Profit & Loss discrepancy question

I'm seeing a discrepancy between 'Average Profit and 'Average Loss' in the Editor/Account Statistics vs. in the 'Statistics RH Panel.
- In the Editor/Account Statistics they appear to be exactly double and incorrect based on the 'Journal' record of individual trades.
Any input much appreciated.
With Thanks.

Post's attachments

171030 FSB Stats Discrepancy Question - Screenshot.JPG 36.28 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Statistics Average Profit & Loss discrepancy question

Please attach the strategy for inspection.

3 (edited by sleytus 2017-11-01 06:39:28)

Re: Statistics Average Profit & Loss discrepancy question

vidagig_13 wrote:

I'm seeing a discrepancy between 'Average Profit and 'Average Loss'

The reason why 'Executed orders' seems double of what you expect is because it counts both 'Open' and 'Close' as separate orders.

Now that vidagig_13 has pointed it out, I'm also seeing the same problem.  I've noticed it before but felt a bit embarrassed to ask about it -- assuming it was something obvious I was missing (and that still may be the case).

I have a very simple strategy that uses a Stop Loss of around 600 points.

From the Journal I can see that everything looks good -- all the losses are around -$6.00.

However, the Account Statistics reports an 'Average loss' of almost double that -- i.e.   -$12.05.  I would have expected the 'Average loss' to be around the Stop Loss.  I am not doing any adding or reducing.

So, my question is:  Why isn't the Average loss approximately equal to the Stop Loss?

I've attached a simple example.  Again -- the Journal entries look fine.

Thanks...

Post's attachments

Example-Average-Profit-Loss.xml 11.91 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4 (edited by sleytus 2017-11-01 07:13:39)

Re: Statistics Average Profit & Loss discrepancy question

A bit more information...

In looking through AccountStatistics.cs I can see the problem is related to 'isInfoInCurrency'. 

In FSB / Account / Output -- if I choose 'Display information in points' then I think I get the correct results.  But if I instead use  'Display information in currency' then it is not what I expect.


Sort of related -- though more a question for Popov or footon...
Is there a way to access the StopLoss value from within AccountStatistics.cs?   I would like to create another metric -- the ratio of StopLoss / AverageLoss.


Thanks...

Re: Statistics Average Profit & Loss discrepancy question

Hi Mr. Popov

I trust you are keeping well, if too busy as usual..

The discrepancy in Average Profit & Average Loss in the Editor 'Account Statistics' (being exactly double) vs. the 'Additional Statistics' RH panel - is not related to a specific strategy; and it occurs on both of my computers with FSB V3.8.6 installed.

I attach a screenshot highlighting the discrepancy more clearly; as well as a test strategy (in my next post) as you requested.

Thanks also to Sleytus for your helpful input too.

Very much appreciated.

Post's attachments

171101 Ave P L Stats Discrepancy - Screen Shot 01.jpg 501.48 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Statistics Average Profit & Loss discrepancy question

Further to my previous post - as requested, a test strategy is attached below.

Post's attachments

171101 Ave P L Discrepancy Test.xml 12.05 kb, 2 downloads since 2017-11-01 

You don't have the permssions to download the attachments of this post.

7 (edited by sleytus 2017-11-01 12:44:13)

Re: Statistics Average Profit & Loss discrepancy question

Is there a way to access the StopLoss value from within AccountStatistics.cs?

I think I found an answer -- using backtester.Strategy.PermanentSL.

The reason I asked is because I would like to compute the ratio of  AverageLoss / StopLoss.   I'll call it ExitQualityNumber (EQN).

EQN = AverageLoss / StopLoss

The EQN should be < 1.  An EQN >= 1 means that my strategy's exit logic isn't working and StopLoss is primarily being invoked to exit the strategy.  If my exit logic is working and getting me out of a trade before the StopLoss hits, then EQN will be < 1.  The smaller the EQN, the better the exit logic.

By the way -- I'm just now experimenting with this, just so you know...

If anyone is interested I'll attach the corresponding AccountStatistics.cs file.

Re: Statistics Average Profit & Loss discrepancy question

Thank you for the reports.
I'll check them later today and will try to provide a fix before the end of the week.

Re: Statistics Average Profit & Loss discrepancy question

Thank you for your excellent support, as usual.

P.S. Sleytus - all the best with your great development work.