[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] How does SCAN engine work - too many repeats ?



PureBytes Links

Trading Reference Links

I want this code to loop 9 times - once for each Sector, but my results is each Sector is named 9 times = 81 composites created. How does the Scan engine work in this code ?

pds=14;

for (i=0;i<=8;i++) // loop through all 9 Sectors
{
SIDnum = SectorID(0) == i;
SIDname = SectorID(1);

Os = RSI(pds);
Ob = RSI(pds);
values1 = os < 30;
values2 = ob > 70;
AddToComposite(Values1,"~s" + i + " - " + SIDname + "RSIBear","V",0 + 16); // repeat 9 times
AddToComposite(Values2,"~RSIbull","V"); // repeat 1 time
Buy=0;
}
;



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/