MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Confirming Price Trend System by Barbara Star

Barbara Star's article in this issue, "Confirming Price Trend," discusses using r-squared
and the slope of a linear regression line in conjunction with moving averages and the stochastic.
All these indicators are built into MetaStock and require no custom formula to use.
Here is a system based on the suggestions in her article.

Long positions are entered when:

  • A 10-period moving average is above a 30-period moving average
  • The stochastic oscillator has risen above 20
  • R-squared is above 0.2
  • -A 20-period linear regression line slope is above zero.

Short positions are entered when:

  • A 10-period moving average is below a 30-period moving average
  • The stochastic oscillator has fallen below 80
  • R-squared is above 0.2
  • A 20-period linear regression line slope is below zero.

Positions are closed when:

  • R-squared is equal to 0.2 or less
  • A 20-period linear regression lines slopes against the position
  • Either the moving averages or the stochastic oscillator give an opposing signal.

The formulas and the steps to recreate this system in MetaStock are shown here:

1. Select Tools > the Enhanced System Tester
2. Click "New"
3. Enter a name
4. Select theBuy Order tab and enter the following formula:


stsig:=if(cross(stoch(14,3),20),1,if(cross(80,stoch(14,3)),-1,prev));
mov(c,10,S)>mov(c,30,s) AND rsquared(c,20)>.2 AND
LinRegSlope(c,20)>0 AND stsig=1

 

 
5. Select theSell Order tab and enter the following formula:

 


stsig:=if(cross(stoch(14,3),20),1,if(cross(80,stoch(14,3)),-1,prev));
rsquared(c,20)<=.2 AND LinRegSlope(c,20)<=0 AND
(stsig=-1 OR mov(c,10,S)<mov(c,30,s))

 

 
6. Select theSell Short Order tab and enter the following formula:

 


stsig:=if(cross(stoch(14,3),20),1,if(cross(80,stoch(14,3)),-1,prev));
mov(c,10,S)<mov(c,30,s) AND rsquared(c,20)>.2 AND
LinRegSlope(c,20)<0 AND stsig=-1

 

 
7. Select theBuy to Cover Order tab and enter the following formula:
 


stsig:=if(cross(stoch(14,3),20),1,if(cross(80,stoch(14,3)),-1,prev));
rsquared(c,20)<=.2 AND LinRegSlope(c,20)>=0 AND
(stsig=1 OR mov(c,10,S)>mov(c,30,s))

 

 
8. Click OK to close the system editor.
Confirming Price Trend System by Barbara Star

--William Golson
MetaStock Support Representative
Equis International (A Reuters Company)
801 265-9998, www.metastock.com

Source / From: TOP
http://www.traders.com  

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!