Hello everyone
I have read vaa paper and its excellent detail backtest on trenxplorer blog.the owner is very generous to provide complete code of the vaa strategy.The main concept is to have risky assets and non risky assets and when anyone of the risky asset show negative momentum then switch to the non risky asset .trendxplorer owner has given the complete code but I thought to implement the strategy with simple rotational system. But it is not working can anybody help me in this regard the code I have written is this
The safe asset portion is in watchlist bond and risky assets and safe asset both are in group 1
BuyPrice = Close;
TimeFrameSet( inMonthly);
SetBacktestMode( backtestRotational );
EnableRotationalTrading() ;
SetOption( "MaxOpenPositions", 1);
SetOption( "Worstrankheld", 1 );
SetPositionSize( 100, method = spsPercentOfEquity );
posscore=100*((12*(Close/Ref(C,-1)-1)+4*(Close/Ref(C,-3)-1)+2*(C/Ref(C,-6)-1)+(close/Ref(Close,-12)-1))/4);
PositionScore=IIf(posscore<0,IIf(InWatchListname("bond"),posscore+10000,posscore),posscore);
PositionScore=1000+PositionScore;
Thanks in advance