The Profitability Rule

 

In his paper http://www.priceactionlab.com/Literature/profitability.pdf Michael Harris represents the profitability rule as : w = pf/(pf+R)

where pf = profit factor, R = payoff ratio and w is the win rate.

How can I convert this into a code in the expert advisor?Can anyone help?Thanks.

 
yacoov:

How can I convert this into a code in the expert advisor?Can anyone help?Thanks.

Sure . . .

double w, pf, pf, R;

w = pf/(pf+R);
 

Thank you RaptorUK, very nice of you.One last question where should I extract this code in the expert?

 
yacoov:

Thank you RaptorUK, very nice of you.One last question where should I extract this code in the expert?

Which Expert ? I don't see any of your code . . .
 
I have had a real laugh with this post.
 
yacoov:

Thank you RaptorUK, very nice of you.One last question where should I extract this code in the expert?

Right after you calculate OrdersHistoryTotal() (and perhaps OrdersTotal() as well).
 

Thanks onewithzachy and RaptorUK.Flaab, RaptorUK made you laugh, now you owe him one.

 
RaptorUK:

Sure . . .

double w, pf, pf, R;

defining pf is already done if you do it once but as often beautiful answer...
 
deVries:
defining pf is already done if you do it once but as often beautiful answer...
LOL . . .