Reduce Quantity based on Volume in Live Trading
Author: kazuna
Creation Date: 6/7/2009 12:16 AM
profile picture

kazuna

#1
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.
profile picture

kazuna

#2
Assuming this is supported in backtesting only, could you consider this for live trading as a feature request?
profile picture

Cone

#3
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.
profile picture

kazuna

#4
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.
profile picture

Cone

#5
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.
profile picture

kazuna

#6
Cool. I'm looking forward to see the sizing control feature in the later version (5.6?), then.
profile picture

Cone

#7
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.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).