In my WL6, I have:
Preferences: Backtest Settings: Limit Position's Quantity to a percentage of the Bar Volume: 10
AND
Preferences: Trading: Trading Options: Exit Orders should always exit full position: NOT checked.
I am now concerned that when I buy a stock, I will buy less than size recommended by position sizer but when I exit I might not sell all the position because the bar volume has changed since I acquired the position.
Backtest results so far do not show such discrepancy, however. My strategy generates signal on bar and buys on bar+1. For my above settings:
1. Which bar's volume is used when entering a position?
2. Which bar's volume is used when exiting the same position?
Thanks in advance
Size:
Color:
"Exit Orders should always exit full position" does not apply to backtesting: it applies to to paper/live trading.
1. When entering a position, the volume on "bar" is used
2. N/A.
Size:
Color:
So if check "Exit Orders should always exit full position", backtest and trade a strategy then why should the positions be out of sync, when backtest anyway exits all the position and so does live trade because I checked the option "Exit Orders should always exit full position" ? Does the warning still apply in this case?
Size:
Color:
If a strategy exits all the position anyway, why worry?
For a collection of possible reasons of getting out of sync please refer to the User Guide > Orders > Portfolio Synch.
Size:
Color:
Is there a way to change the bar that 'Limit a Position's Quantity to a Percentage of the Bar's Volume' uses? In live trading the volume on "bar" is not known until after the fact and so the backtest cannot be replicated in live trading. Alternately is there another way to limit the trade size to yesterday's volume or average of last X days volume etc. ?
Size:
Color:
Unlike "Exit Orders", this option ("Limit Position's Quantity...") applies to backtests and does not coincide with live trading. Like I said in the first reply:
QUOTE:
1. When entering a position, the volume on "bar" is used
The volume on "bar" is very well known in live trading because it's the last bar (Bars.Count - 1) available to your system that it just used to generate Alerts for the incomplete bar+1. Of course this option is N/A in live trading as you can not know the partial bar's volume until it closes.
QUOTE:
Alternately is there another way to limit the trade size to yesterday's volume or average of last X days volume etc. ?
Yes there is - the
Position Options PosSizer uses SMA of Volume:
* Reduce a position's size to a percentage of the N-day moving average of VolumePlease correct me if I'm wrong because your problem doesn't make sense to me.
Size:
Color:
All good. PosSizer is the solution to what we need. Thanks Eugene.
Size:
Color: