/* Multiple-security indicator example */ /* Language: AFL + VBScript */ /* Use in "Scan" only */ /* (C)2001 Tomasz Janeczko /* the criterion to check */ values = rsi() < 30; EnableScript("vbscript"); days = day(); months = month(); years = year(); <% days = AFL("days") months = AFL("months") years = AFL("years") values = AFL("values") ' get the access to AmiBroker's application object Set oAB = CreateObject("Broker.Application") ' we add artificial "_composite" stock that we will use to store ' the cross-market statistics information Set comp = oAB.Stocks.Add( "_composite" ) For i = 0 To UBound( days ) Set qt = comp.Quotations.Add( years( i ) & "-" & months( i ) & "-" & days( i ) ) If values( i ) = 1 Then qt.Volume = qt.Volume + 1 Next %> buy = 0;