If I go Strategy Settings->Position Sizing->Position Size and select "Max Risk Percent"...
... then my short strategy shows no longer any positions.
In fact the helper function internally used:
returns a negative value in this case.
... then my short strategy shows no longer any positions.
In fact the helper function internally used:
CODE:
double riskSize = CalculatePositionSize(PositionSizeType.MaxRiskPct, riskPct, bars, basisPrice, equity);
returns a negative value in this case.
Rename
Thanks for the report, we will add it to the docket for investigation.
I don't know, seems to be working for me.
Would you mind sharing your GetMaxRiskStopLevel() method code, a symbol, and the Max Risk % amount?
Edit -
I take it back. Even though I'm getting some short trades, the sizing seems to be off. Will investigate!
Would you mind sharing your GetMaxRiskStopLevel() method code, a symbol, and the Max Risk % amount?
Edit -
I take it back. Even though I'm getting some short trades, the sizing seems to be off. Will investigate!
I've looked at this way too much today and once I run the numbers, cannot find a problem.
One thing you can try is unchecking "Retain NSF Positions".
Aside from the that, let's see what you're using for the GetMaxRiskStopLevel() method, a symbol, and a specify the Max Risk %. Then we can then talk about a specific case.
One thing you can try is unchecking "Retain NSF Positions".
Aside from the that, let's see what you're using for the GetMaxRiskStopLevel() method, a symbol, and a specify the Max Risk %. Then we can then talk about a specific case.
Yes, PLEASE submit some full strategy code with a way to reproduce the issue in a minimal way. This will save us all time in having to guess what might be happening in your code and help us resolve issues more quickly.
Mea Culpa! (my bad)
I totally overlooked GetMaxRiskStopLevel() and was confused by the fact that for long systems there is a working default.
Probably the PosSizer should issue some warning or exception if there is no reasonable RiskStopLevel, especially for short exits.
Again: Sorry for the trouble!
I totally overlooked GetMaxRiskStopLevel() and was confused by the fact that for long systems there is a working default.
Probably the PosSizer should issue some warning or exception if there is no reasonable RiskStopLevel, especially for short exits.
Again: Sorry for the trouble!
Your Response
Post
Edit Post
Login is required