Is there any way to reduce quantity based on volume while live trading?
It works fine in backtesting but doesn't seem working in live trading.
For live trading, it would be calculated based on the volume at bar and generate an alert at bar+1.
Size:
Color:
Assuming this is supported in backtesting only, could you consider this for live trading as a feature request?
Size:
Color:
You can already trade any quantity that you like, but the first step is to disable the Trading Preference (F12) for Exit Orders to always exit the full position held in your account.
Size:
Color:
But the exit preference setting only affects to the exit order not entry order, correct?
I want the entry order to be reduced automatically if the volume is lower than certain threshold.
Let's say my Position Size is set to $100K and the last bar's volume size is $500K, if I set the limit of the percentage of the bar's volume to 10%, I would like the entry order to be placed to $50K not $100K like if it worked in the backtest mode. This will greatly reduce the chance of slippage especially low trading volume these days.
Size:
Color:
Fine control of sizing like that won't be available until later, this year I think. Like in Versoin 4, you'll be able to create scripts to control sizing with almost no limitations.
Size:
Color:
Cool. I'm looking forward to see the sizing control feature in the later version (5.6?), then.
Size:
Color:
There's also a simpler WealthScript function that should make 5.5. SetShareSize will allow you to accomplish about the same thing within the Strategy code itself.
The limitation of SetShareSize vs. "PosSizers" is that PosSizers can access Portfolio cash and equity, which you cannot do in v5 scripts (at least not without some fancy code). Also, PosSizers, like other sizing options, can be used for any script.
Size:
Color: