on the fly calculation of average win, loss, and win probability

 

Is there any function which returns the overall average win amount, average loss amount, and winning/losing trade fraction? I'm thinking about implementing a kelly subroutine to handle position sizing and would like to make it fully automatic (to be turned on by user after sufficient history is collected).

 
gatornuke:

Is there any function which returns the overall average win amount, average loss amount, and winning/losing trade fraction? [...]

You will find code to that here -> https://www.mql5.com/en/articles/1403.
 

Ok, it seems that i can do an orderselect loop by MODE_HISTORY and tally up and average the orderprofits and losses. I can put a counter in there to tally the number of wins and get the winning percentage that way.

This should work. Thanks.

 
gatornuke #:

Ok, it seems that i can do an orderselect loop by MODE_HISTORY and tally up and average the orderprofits and losses. I can put a counter in there to tally the number of wins and get the winning percentage that way.

This should work. Thanks.

Hey gatotnuke, came across this article in hopes of finding the same thing to test my consistency. Can you share this EA do you have mt5 version.