Say I want to do position sizing based on the distance to a stop.  For
example, say I want to size based on overall portfolio risk.  I've
tried the following code:

PositionSize = -5*Buyprice/(Buyprice*0.12);

But that doesn't generate any trades.  So, I'm guessing the code is
way, way wrong - can anyone help me out here?

Second related question: let's say position sizing using this method
results in the use of leverage.  How can I make the leverage dynamic
so that the system automatically scales to the required leverage for
the system?

Thanks,

Damian

Reply via email to