SetOption("WorstRankHeld", LastValue( Total ) );
or
SetOption("WorstRankHeld", SelectedValue( Total ) );See users guide for more info on these functions. Steve ----- Original Message ----- From: "KBGlenn" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, April 04, 2008 10:07 PM Subject: [amibroker] Help With Code > AGG1 = IIf(AGG/Ref(AGG,-X) > 1, 1, 0); > DBC1 = IIf(DBC/Ref(DBC,-X) > 1, 1, 0); > DBV1 = IIf(DBV/Ref(DBV,-X) > 1, 1, 0); > EEM1 = IIf(EEM/Ref(EEM,-X) > 1, 1, 0); > IAU1 = IIf(IAU/Ref(IAU,-X) > 1, 1, 0); > IYR1 = IIf(IYR/Ref(IYR,-X) > 1, 1, 0); > > Total = AGG1 + DBC1 + DBV1 + EEM1 + IAU1 + IYR1; > > A = C/Ref(C,-X); > > EnableRotationalTrading(); > > //WRH = Param("Worst Rank Held", 1, 1, 10, 1); > SetOption("WorstRankHeld", Total); > > I keep getting Error 5, argument #2 has incorrect type on the > SetOption line. Is there anyway I can make "Total" a numerical > variable based on the code above? It appears WorstRankHeld must have > a number, yes/no? > > Tks > > > ------------------------------------ > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > Yahoo! Groups Links > > > >
