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

[amibroker] Re: Help with referencing previous prices



PureBytes Links

Trading Reference Links

Cross(RSI(10),70);  is a Sell condition.
>From the Cross definition, the value of RSI(10)  will be a bit higher 
than 70 .
How about the respective values of RSI(20),RSI(30),RSI(40),RSI(50) 
for the same day ?
The Automatic Analysis will try through the exploration

//Explore the current stock for all quotations
Filter=Cross(RSI(10),70);//the Sell Condition
for(k=20;k<60;k=k+10)
{
AddColumn(RSI(k),"RSI("+WriteVal(K,1.0)+")");
}

It is not that easy to read the Results matrix and come to 
qualitative conclusions.
We may see the AA results in Indicator Builder with

 //Exploration Results Graph
Cond=Cross(RSI(10),70);//the Sell Condition
d=DateTime();
kFROM=20;kTO=60;
for(k=kFROM;k<kTO;k=k+10)
{
CondRSI=ValueWhen(Cond,RSI(k));
num=LastValue(Cum(Cond));L1=LastValue(Cum(1))-1;
j=L1-num+1;
g=0;f=0;
for(i=0;i<BarCount;i++)
{
if(Cond[i]==1)
{
g[j]=CondRSI[i];f[j]=d[i];
j=j+1;
}
}
dd=WriteIf(k==kFROM,"\nCross date="+WriteVal(f,formatDateTime),"");
Plot(g,dd+"\ng("+WriteVal(k,1.0)+") ",33+(k/10),styleThick);
}
Plot(30,"",1,1);
Plot(50,"",Cum(1)%2,1);
Plot(70,"",1,1);
Plot(90,"",1,1);

It is obvious now that 
a. the RSI(20 to 50) values rarely exceed 70, 
b. they come down to 50 as the RSI period increases
c. a Cross(RSI(50),70) would not join well the initial Sell condition
d. RSI values are ascending for the last 15 bars [the Nov2002 till 
now bullish period]
etc, etc

As you see,  we may also have the actual Cross dates for better 
understanding.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Is Cross(MACD(),Signal()); a safe Buy condition ?
> For a positive answer we should see oversold prices in the basic 
> indicators.
> The exploration
> 
> Filter=Cross(MACD(),Signal());//the Buy Condition
> AddColumn(StochD(),"StochD");
> AddColumn(RSI(),"RSI");
> 
> will give the RSI() and StochD() values for the Cross day.
> Since it is not always easy to search among the columns, here is a 
> visual interpretation:
> We may plot the CondRSI and the CondSTOCHD values in the same chart.
> 
> //Exploration Results Graph, by D. Tsokakis, March2003
> Cond=Cross(MACD(),Signal());//the Buy Condition
> CondRSI=ValueWhen(Cond,RSI());
> CondSTOCHD=ValueWhen(Cond,StochD());
> num=LastValue(Cum(Cond));L1=LastValue(Cum(1))-1;
> j=L1-num+1;g1=0;g2=0;
> for(i=0;i<BarCount;i++)
> {
> if(Cond[i]==1)
> {
> g1[j]=CondRSI[i];
> g2[j]=CondSTOCHD[i];
> j=j+1;
> }
> }
> Plot(30,"",1,1);
> Plot(50,"",1,1);
> Plot(70,"",1,1);
> Plot(g2,"CondSTOCHD",colorRed,styleThick);
> Plot(g1,"CondRSI",colorWhite,styleArea);
> Filter=Cond;
> AddColumn(CondRSI,"CondRSI");
> AddColumn(CondSTOCHD,"CondSTOCHD");
> 
> We will recognize at a glance many RSI and/or StochD values quite 
far 
> from the o/s area.
> Dimitris Tsokakis



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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 
Yahoo! Groups Links

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

<*> 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/