|
Alpha Trader
2018-01-13 13:48:10
|
|
Hello -
I have a script where I rank symbols.
comborank = comp(ROCP(50),"rank");
test = Comp(ROCP(50),"count");
pos = iff(test >= 15,15,test);
SetSimPosSize(100/pos,_PercentOfEquity);
SetSimTiming(_Buy,_Close,0);
SetSimTiming(_Sell,_Close,0);
buy = (comborank <= POS) and (RebalIndexDate ==0);
sell = (RebalIndexDate ==0);
I would like the system to be 100 percent invested - no more - Also I would like it to hold positions which have buy signals.
When I use -
sell = (RebalIndexDate ==0) and (comborank > POS);//
The system doesn't hold 15 Positions......
Any Sugestions?
|
|