PureBytes Links
Trading Reference Links
|
Alvin,
1. Buy and sell signals can be displayed on a chart by using the
expert. Use the cross function. Also I would use a shorter lookback
period on the bollinger bands. A lookback of 100 will keep you out of
some very nice trends. You may want to consider a smaller standard
deviation as well. Remember that the expert cannot use input values
so decide what you will use then set them. Like this:
{BUY}
BB:=bbandbot( RSI(14), 100, S, 2.0);
Cross(RSI(14),BB);
{SELL}
BT:=bbandtop( RSI(14), 100, S, 2.0);
Cross(BT,RSI(14));
If you have not done so take a look at some of the built-in experts.
There are a number of them that are not password protected.
Once you have an acceptable system with signals that you like and
understand you can venture onto the explorer. Until then I would
stick with your system design.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, Alvin Yu <alvinyu2005@xxx>
wrote:
>
> Hi Preston
> Â Â Â Thks for the guidance .It works.
>
> Â Â Â 1) How do I write a program to add the buy/sell signals in
the price chart?
>
>    2) Anyway to put this in "Teh Explorer" toscreen stock
that have the buy and sell signal? That will be super.
>
> rgds
>
>
> Â
>
>
>
> ________________________________
> From: pumrysh <no_reply@xxxxxxxxxxxxxxx>
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Saturday, 31 January 2009 3:36:41
> Subject: Re: [EquisMetaStock Group] Adaptive RSI
>
>
> Alvin,
>
> See if this helps.
>
> From the built in help files:
>
> Bollinger Bands use the stdev() function to calculate the upper and
> lower bands. The middle band is a 20-period simple moving average.
>
> Periods:=input( "Enter the number of periods: ",5,50,20); mov(C,
> Periods, S); mov( C, Periods, S ) + ( 2 * stdev( C, Periods )); mov
(
> C, Periods, S ) - ( 2 * stdev( C, Periods ))
>
> SYNTAX bbandbot( DATA ARRAY, PERIODS, METHOD, DEVIATIONS )
>
> FUNCTION Calculates the bottom Bollinger Band of DATA ARRAY
> using METHOD calculation method and shifted downward DEVIATION
> standard deviations. Valid methods are SIMPLE, EXPONENTIAL,
> WEIGHTED, TIMESERIES, TRIANGULAR, and VARIABLE (these can be
> abbreviated as S, E, W, T, TRI, and VAR).
>
> EXAMPLE bbandbot( close, 10, S, 2 )
>
> For the top band we would use:
>
> bbandtop( close, 10, S, 2 )
>
> On January 14th, Patrick Butler offered this formula:
>
> x:=Input("number of periods for RSI",1,2000, 14);
> k1:=Input("standard deviation constant",0. 1,5,1.8);
> c1:=Input("SMA constant",0. 1,5,2);
> m1:=Input("method <1=SD/2=SMA> ",1,2,1);
> top:=If(m1=1,
> 50+(k1*Stdev( RSI(x),x) ),
> 50+(c1*Mov(Abs( RSI(x)-Mov( RSI(x),x, S)),x,S)) );
> bottom:=If(m1= 1,
> 50-(k1*Stdev( RSI(x),x) ),
> 50-(c1*Mov(Abs( RSI(x)-Mov( RSI(x),x, S)),x,S)) );
> RSI(x);
> top;
> bottom;
>
> Patrick also mentions that it may possibly be the formula! It is
> indeed very close to the formula that we need.
>
> Compare the equis top band to that of the formula given by Patrick:
> mov( C, Periods, S ) + ( 2 * stdev( C, Periods ));
> 50+(k1*Stdev( RSI(x),x) )
>
> So what does the Active Trader Magazine article have to say?
> Here is the link again:
> http://store. activetradermag. com/futures_ tsl1105.pdf
>
> System concept: The Relative Strength Index (RSI) is a momentum
> indicator
> that oscillates between zero and 100, where values above a certain
> level
> (default 70) indicate overbought situations and values below 30
> indicate the
> opposite. The indicator's default lookback period is 14. (See "Key
> Concepts
> and Definitions, " p. 81, for more information on the RSI.)
>
> Typically, the indicator's overbought and oversold levels are
fixed.
> Standard
> RSI systems usually issue buy signals when the RSI exits the
oversold
> area
> (i.e., crosses above 30) and give sell signals as soon as the RSI
> leaves the overbought
> area (i.e., drops below 70). This system experiments with
> changing the overbought/oversold levels depending on market
> conditions.
> For example, during low-volatility periods it is usually better to
> set the boundaries at,
> say, 60 and 40, because the indicator is less likely to fluctuate
> extremely higher or lower during such periods. Conversely, very
> volatile periods might require levels of 80 and 20 to avoid
> generating too many false signals.
>
> This system changes the RSI's oversold/overbought boundaries
> dynamically. (As the testing will
> illustrate, doing this converts a losing system into a profitable
> one.) To accomplish this, the system applies
> Bollinger Bands (see "Key Concepts and Definitions, " p. 81) to the
> RSI itself. As a result, instead of using
> fixed overbought and oversold levels, these readings are defined by
> the dynamic Bollinger Band calculation
> â?" as the bands change according to the RSI's volatility, so do
the
> overbought/oversold levels
> .
> Rules:
> 1. Go long next day at market if the 14-day RSI
> crosses above the lower Bollinger Band, using a
> 100-day simple moving average and two
> standard deviations for the Bollinger Band
> parameters.
> 2. Exit long next day and go short at market if the
> 14-day RSI crosses below its upper Bollinger
> Band.
> 3. Place a stop-loss four times the 10-day average
> true range (ATR) from the entry price.
> Figure 1, which shows trades in the S&P 500 E-Mini
> futures (ES), illustrates how the RSI bands adapt to changing
> volatility. In August 2003, the lower band was at 44 and the higher
> band was at 74. On Aug. 8 the RSI crossed above its lower
> band, issuing a buy signal; a standard RSI system with a fixed
> oversold level of 30 or 40 would not have caught this trade
> opportunity. The system stayed in this trade until Jan. 12, when
> the RSI crossed below the upper band and the system went
> short.
> It exited when a second crossover above the lower band occurred on
> March 18.
>
> Putting everything we have learned together we come up with the
> following formula:
>
> {Adaptive RSI System with an idea
> Taken from the November 2005 Active Trader article}
> x:=Input("number of periods for RSI",1,2000, 14);
> sd1:=Input(" standard deviation constant",0. 1,5,2);
> bs1:=Input(" Bollinger Band Smoothing",1, 200,100);
> bbandtop( RSI(X), bs1, S, sd1 );
> bbandbot( RSI(X), bs1, S, sd1 );
> RSI(x); {end}
>
> Preston
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|