Hi,
i was using the below code for scaling in...
//---------------------------------------------- Scaling In ----------------------------------------------//
Sellsignal = 0;
x = SumSince(sellsignal, buysignal);
xsigs = X <=50;
firsttrade = x <=0;
TimeFrameRestore();
BuySignalX = TimeFrameExpand( BuySignal, inWeekly );///@link https://www.amibroker.com/guide/a_mistakes.html#TIMEFRAME
xsigsX = TimeFrameExpand( xsigs, inWeekly );
SellsignalX = TimeFrameExpand( Sellsignal, inWeekly );
Friday = DayOfWeek()==5;
Monday = DayOfWeek()==1;
Buy = IIf(Friday AND BuySignalX AND xsigsX, sigScaleIn, 0);
exitLastBar = datetime() >= GetFnData("DelistingDate");
Sell = Friday AND SellsignalX OR exitLastBar;
SetPositionSize( IIf(firsttrade, PctSize, 0.5*(PctSize)), spsPercentOfEquity );
all was working fine till last friday when i started getting an error msg
I havent changed the code and this was working perfect till last week.
Can someone please help me figure what went wrong here ?
thanks,
Gautam