Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Re: 12/21 Worden Webinar Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rwj
Posted : Wednesday, December 22, 2010 2:54:14 PM
Platinum Customer Platinum Customer

Joined: 12/31/2004
Posts: 16
How would I create/write a StockFinder condition to reflect/sort:   Closing Price above the 200 Moving Average by 1.5% or more ?
StockGuy
Posted : Wednesday, December 22, 2010 2:57:20 PM

Administration

Joined: 9/30/2004
Posts: 9,187
Create new RealCode conditon on a Daily chart using...

If price.close / price.avg(200) >= 1.015 then pass

If you're using an exponential moving average, then...

If price.close / price.xavg(200) >= 1.015 then pass
Bruce_L
Posted : Wednesday, December 22, 2010 2:59:40 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You could try the following RealCode Condition (for a Simple Moving Average):

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Price above Moving Average
'|******************************************************************
'# MAperiod = UserInput.Integer = 200
'# byPercent = UserInput.Single = 1.5
If Price.Last >= (1 + byPercent / 100) * _
    Price.AVGC(MAperiod) Then Pass

You can change Price.AVGC to Price.XAVGC if you want an Exponential Moving Average instead.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rwj
Posted : Thursday, December 30, 2010 11:42:24 PM
Platinum Customer Platinum Customer

Joined: 12/31/2004
Posts: 16
How would I create/write the StockFinder condition to sort for:   Closing Price BELOW the 200 Moving Average by at least 1.5% AND RSI ABOVE 70 for 2 Periods ?                   (Per the 12/21/10 Worden Webinar)
Bruce_L
Posted : Friday, December 31, 2010 9:28:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Price below MA and RSI above 70
'|******************************************************************
'# RSI = indicator.Library.Relative Strength Index (RSI)
'# MAperiod = UserInput.Integer = 200
'# byPercent = UserInput.Single = 1.5
If Price.Last <= (1 - byPercent / 100) * _
    Price.AVGC(MAperiod) AndAlso _
    RSI.Value > 70 AndAlso _
    RSI.Value(1) > 70 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.