|
Kiran
2016-06-23 03:12:28
|
|
I place multi-day Limit orders that are valid for 5 days (code below), and noticed I get only 48% exposure, even though I have only 5 positions
and a universe of S&P500 stocks (and the signals fire quite liberally) - my hold period is ~6 days.
It seems as though once 5 Buy Limit orders are fired and active, no more orders are triggered until the active orders are filled, and these orders may wait for 5 days and expire unfilled.
What makes this worse is if there are 3 positions and 2 active orders, no more orders are triggered.
Is there some way the system can fire all the orders signalled (could be 15) but fill only the first 5 and cancel the rest once the portfolio is full no remaining cash?
This would be expected in a live trading system.
- If not what's a work-around to get 100% exposure?
thanks
Kiran
Buy = r>ref(r,1) && uptrend;
//SetSimTiming(_Buy,_Close,-1);
SetSimTiming(_Buy,_Limit,0);
BuyPrice(r*(1-lt*brick/100), 5);
Sell = r<ref(r,1) || f;
//SetSimTiming(_Sell,_Close,-1);
SetSimTiming(_Sell,_Limit,0);
SellPrice(r*(1+lt*brick/200), 5);
|
|