SumSince is available from v6.10 and up, was: SumSince syntax is now showing unidentified. Pls help!

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

scalein

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

@gautamlaungani the code sample posted here will not execute reporting different errors since some variables are not initialized:
Error 29 - variable used without having been initialized.

For instance, you forgot (or deleted?) the definition of buysignal (used in the line where you get the SumSince error).

Later in the code (last line of your snippet), there is again the above error when you use PctSize.

After fixing these, I see no other errors: what version of AmiBroker are you using?

hi @beppe,

Thanks for your reply. I just realized I installed a previous version on my new comp and thats why the sumsince syntax wasnt working. now using ver 6.2. Apologies for the trouble but once again thank you for the help.

cheers,
gautam