You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm trying to get either OrderContext.cash_now or SimulationContext_last_cash (should be the same) from my portfolio from signals to get current cash and then calculate size of the position to always risk 1% (lose 1% of cash when stop loss is hit). I saw in documentation that SizeType "Percentage" is calculated from OrderContext.cash_now, but I can not get this done. Could you please help me? Somehow I can't manage to get OrderContext.cash_now or SimulationContext_last_cash out of portfolio for my function where I calculate sizing.
Hi. I'm trying to get either
OrderContext.cash_now
orSimulationContext_last_cash
(should be the same) from my portfolio from signals to get current cash and then calculate size of the position to always risk 1% (lose 1% of cash when stop loss is hit). I saw in documentation thatSizeType
"Percentage" is calculated fromOrderContext.cash_now
, but I can not get this done. Could you please help me? Somehow I can't manage to getOrderContext.cash_now
orSimulationContext_last_cash
out of portfolio for my function where I calculate sizing.This is my portfolio without sizing calculation:
The text was updated successfully, but these errors were encountered: