Libraries: Position sizing from risk, using the broker's own tick value and volume step

 

Position sizing from risk, using the broker's own tick value and volume step:

Position size from a risk amount, computed from the symbol's real tick value, tick size and volume step rather than an assumed pip value. It always rounds volume down, and when your risk is smaller than the minimum lot it says so and reports what that lot actually costs. No terminal state, so the sizing logic is testable offline - a 41-assertion test script is included.

Position sizing from risk, using the broker's own tick value and volume step

Author: Ralph Ivan Simeon