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

[amibroker] Re: Highest 10/Lowest 10 from 200 (buy-sell displayed)



PureBytes Links

Trading Reference Links

I was mainly using this as another confirmation to my other 
indicators before the a reversal occurs.

-- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> You may see the highest and the lowest [you dont need the loop for 
> this] and add a B arrow/S arrow on the graph. Note that it is only 
> for graphic purposes, it is not a true Buy/Sell signal. It has no 
> practical value to learn that a Buy was produced 43 bars ago and 
any 
> backtesting with these signals would be unrealistic and, 
> consequently, false.
> 
> // Highest 10/Lowest 10 from 200
> R=RSI();
> X0=RSI();Y0=RSI();
> L1=LastValue(Cum(1));
> N=200;// the lookback period
> TOP=10;// the topX calibration
> for(K=1;K<=TOP;K++)
> {
> X1=LastValue(HHV(X0,n));
> BAR1=LastValue((ValueWhen(X0==X1,Cum(1)-1)));
> X0[BAR1]=-10;
> Y1=LastValue(LLV(Y0,n));
> BAR2=LastValue((ValueWhen(Y0==Y1,Cum(1)-1)));
> Y0[BAR2]=110;
> }
> B=R==LastValue(LLV(R,N));S=R==LastValue(HHV(R,N));
> PlotShapes(shapeUpArrow*B,colorGreen);
> PlotShapes(shapeDownArrow*S,colorRed);
> COLOR=IIf(X0==-10,colorRed,IIf
(Y0==110,colorBrightGreen,colorBlack));
> Plot(IIf(Cum(1)>L1-N,R,-1E10),"RSI",COLOR,2);
> 
> You may also see the top10/bottom10 digits with
> http://groups.yahoo.com/group/amibroker/message/48116
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "run_for_your_life2003" 
> <run_for_your_life2003@xxxx> wrote:
> > I would like to add a "buy" and "sell" signal output when the 
> > highest and lowest bar are being displayed.
> > with an output number of the highest and lowest number as they 
are 
> > being displayed either in the (red bars) positive extremes or 
the 
> > (green bars) negative extremes.
> > 
> > I cannot seem to get it to work!
> > ---------------------------------------------------------------
> > You may see both top10 and bottom10 in the same graph.
> > 
> > // Highest 10/Lowest 10 from 200
> > R=RSI();
> > X0=RSI();Y0=RSI();
> > L1=LastValue(Cum(1));
> > N=200;// the lookback period
> > TOP=10;// the topX calibration
> > for(K=1;K<=TOP;K++)
> > {
> > X1=LastValue(HHV(X0,n));
> > BAR1=LastValue((ValueWhen(X0==X1,Cum(1)-1)));
> > X0[BAR1]=-10;
> > Y1=LastValue(LLV(Y0,n));
> > BAR2=LastValue((ValueWhen(Y0==Y1,Cum(1)-1)));
> > Y0[BAR2]=110;
> > }
> > COLOR=IIf(X0==-10,colorRed,IIf
> (Y0==110,colorBrightGreen,colorBlack));
> > Plot(IIf(Cum(1)>L1-N,R,-1E10),"RSI",COLOR,2);
> > 
> > For easier reading select Scaling : Custom min=0, max=100
> > Dimitris Tsokakis


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Special Sale: 50% off ReplayTV
Easily record your favorite shows!
CNet Ranked #1 over Tivo!
http://us.click.yahoo.com/WUMW7B/85qGAA/ySSFAA/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/