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

[amibroker] To begin with



PureBytes Links

Trading Reference Links




Let us find the top10 of the last 100 Stochd() 
values.
In AA explore the current stock for the last 100 
bars.
// The top10 of an exploration
<FONT 
size=2>bars=100;H1=StochD()*(LastValue(Cum(1))-Cum(1)<bars);H11=H1;H2[0]=0;Counter=0;top=10;for(n=1;n<=top;n++){for(i=1;i<BarCount;i++){H2=LastValue(Highest(H1));if(H1[i]==H2[i]){if(Counter<top){H1[i]=0;Counter=Counter+1;}}}}Filter=1;AddColumn(H11,"Array");AddColumn((H1==0)*H11,"Top10");
 
In the "Top10" column you read the 10 highest StochD() values, 
all the rest are 0.
Dimitris Tsokakis






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.