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

[amibroker] Re: Subject: Results of Scan/Exploration



PureBytes Links

Trading Reference Links

To be more exact, the top5 of the last 100 H is
H1=LastValue(HHV(H,100));
H2=LastValue(HHV(IIf(H<H1,H,0),100));
H3=LastValue(HHV(IIf(H<H1 AND H<H2,H,0),100));
H4=LastValue(HHV(IIf(H<H1 AND H<H2 AND H<H3,H,0),100));
H5=LastValue(HHV(IIf(H<H1 AND H<H2 AND H<H3 AND H<H4,H,0),100));
Filter=1;
AddColumn(H1,"h1");
AddColumn(H2,"h2");
AddColumn(H3,"h3");
AddColumn(H4,"h4");
AddColumn(H5,"h5");
DT
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Explore ^NDX for the n=1 last bar with
> H2=HHV(IIf(H!=H1,H,0),100);
> H3=HHV(IIf(H!=H1 AND H!=H2,H,0),100);
> H4=HHV(IIf(H!=H1 AND H!=H2 AND H!=H3,H,0),100);
> H5=HHV(IIf(H!=H1 AND H!=H2 AND H!=H3 AND H!=H4,H,0),100);
> Filter=1;
> AddColumn(H1,"h1");
> AddColumn(H2,"h2");
> AddColumn(H3,"h3");
> AddColumn(H4,"h4");
> AddColumn(H5,"h5");
> The result is the top5 H .
> If we take the 100 results of the 
> Filter=1;
> AddColumn(Stochd(),"STOCHD");
> exploration of n=1 last bar of the 100 N100 stocks and put them as 
> the last 100 values of H of a certain stock, we could do it.
> DT
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx> 
> wrote:
> > Although it sounds simple, it isnīt.
> > It is also difficult to find the top5 H of the last 100 bars of 
> MSFT.
> > [this is the horizontal sorting, in exploration result we need 
the 
> > vertical one...
> > DT
> > --- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> > > Hi DT,
> > > yes such a function in AFL would indeed be nice.
> > > Here is my AFL suggestion:
> > > 
> > >   CutTable(columnNbr, n, bAscending = true);
> > > 
> > > This would be evaluated after the the result table 
> > > was generated and would sort it and cut after the first
> > > n records.
> > > 
> > > Another method would be using OLE/COM interface by executing
> > > the users AFL script and exporting the table programmatically, 
> then
> > > sorting and cutting within the other program or AFL plugin DLL, 
> and
> > > putting the remaining tickers into a watchlist and running the 
> users
> > > script a second time but now on this watchlist... Hmmm.. maybe 
not
> > > very efficient. But generally, this is doable but tedious. The 
> best 
> > would 
> > > be the proposed new AFL method above.
> > > 
> > > UM
> > > 
> > > 
> > > ----- Original Message ----- 
> > > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Wednesday, April 23, 2003 9:14 AM
> > > Subject: [amibroker] Re: Subject: Results of Scan/Exploration
> > > 
> > > 
> > > > Herman,
> > > > Stewart asked at
> > > > http://groups.yahoo.com/group/amibroker/message/38506
> > > > something simple : how to select the top5 of an exploration. 
> Any 
> > idea 
> > > > for this request ?
> > > > [If I understood well, to run an exploration
> > > > Filter=1;
> > > > AddColumn(MACD(),"MACD");
> > > >  for 100 stocks and see in the result list ONLY the top5 
MACDs, 
> > > > nothing else]
> > > > I do not see how can I do it. 
> > > > [I hope to avoid MAX(Foreign("~AAPL-MACD","C"),MAX(Foreign
> ("~ABGX-
> > > > MACD","C"),...]
> > > > Any idea appreciated.
> > > > Dimitris Tsokakis
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" 
> > <psytek@xxxx> 
> > > > wrote:
> > > > > Using array subscripts you can put any kind of data into a 
> > array:
> > > > >     Data[0] = YourParameter1;
> > > > >     Data[1] = Your{arameter2;
> > > > > YourParameter could also use subscripts...
> > > > > 
> > > > > When you want to save the data into a stock-specific array 
> you 
> > use 
> > > > the Atc,
> > > > > some thing like this for the Explorer:
> > > > > 
> > > > > AddToComposite(Data,"~"+Name()+"-Data","X",1|2|4|16); // 
Use 
> in 
> > > > Explorer,
> > > > > Data here refers to the array you filed using subscripts. 
> This 
> > > > array will be
> > > > > of length equal to number of bars in the current stock - a 
> bit 
> > of
> > > > > over-kill - but this means you can put a ton of data into a 
> > > > Composite (5
> > > > > fields: OHLCV). The great thing is that this information 
> > remains on 
> > > > Disk for
> > > > > re-use at any time from any program, use Foreign("~"+Name()
+"-
> > > > Data","X");
> > > > > here X can be any of OHLCV.
> > > > > 
> > > > > You can save system calibration data for automatic recall. 
> You 
> > > > cannot save
> > > > > text in a Composite however you can save Status
("StockNum"), 
> > this 
> > > > is an
> > > > > ordinal number pointing to your stock in your group (it 
> changes 
> > as 
> > > > you
> > > > > change groups!!).
> > > > > 
> > > > > Best regards,
> > > > > Herman
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >   -----Original Message-----
> > > > >   From: Stewart [mailto:stewart@x...]
> > > > >   Sent: April 22, 2003 10:29 AM
> > > > >   To: amibroker@xxxxxxxxxxxxxxx
> > > > >   Subject: Re: [amibroker] Subject: Results of 
> Scan/Exploration
> > > > > 
> > > > > 
> > > > >   but using AddtoComposite(), is there a way to relate "a 
> row" 
> > to a 
> > > > specific
> > > > > ticker?
> > > > >     ----- Original Message -----
> > > > >     From: Dimitris Tsokakis
> > > > >     To: amibroker@xxxxxxxxxxxxxxx
> > > > >     Sent: Tuesday, April 22, 2003 5:56 PM
> > > > >     Subject: [amibroker] Subject: Results of 
Scan/Exploration
> > > > > 
> > > > > 
> > > > >     Suppose we run an exploration for 100 stocks
> > > > >     X=StochD();
> > > > >     Filter=1;
> > > > >     AddColumn(X,"StochD");
> > > > >     for one day.
> > > > >     The result is an 100-dimension vector.
> > > > >     We can save only in 6 fields through AddToComposite() 
> > function, 
> > > > namely
> > > > > C, O, H, L, V, I.
> > > > >     If we place the first 6 results to each field, we have 
no 
> > place 
> > > > to save
> > > > > the rest 94 results.
> > > > >     It is a 100X100 diagonal matrix, as in the att. gif
> > > > >     but, even if we could, the result would not be an array.
> > > > >     An array has one numerical value per day. In this case 
we 
> > would 
> > > > have a
> > > > > set of 100 numerical values per day
> > > > >     and we would create an 100-dimensional "Hyper array".
> > > > >     It needs specific imagination to understand the use of 
> this 
> > > > creature.
> > > > >     DT
> > > > > 
> > > > >     There's no way to store the results of an Exploration 
to 
> an 
> > > > array,
> > > > > right?
> > > > > 
> > > > >     Thanks,
> > > > > 
> > > > >     Stewart


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/AG3JAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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