Registered User Joined: 2/24/2009 Posts: 7
|
Can we convert this stockfetcher code to Realcode? Thank you very much in advance.
show stocks where close is between 10 and 50
and average volume(90) > 500000
and open < ema(21)
and open < ema(8)
and open < ema(4)
and close > ema(21)
and close > ema(4)
and close > ema(8)
and close > open
and close 3 days ago < ema(21)
and close 5 days ago < close 3 days ago
and close 5 days ago < ema(90)
and beta above 1
and Slow Stochastic(10) Fast %K is below 75
and MACD Fast Line(12,26,9) is above the MACD Slow Line(12,26,9)
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I am not familiar with StockFetcher. My best guess at converting the first part of the code into a RealCode Condition would be:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:irishpitbull 51237
'|******************************************************************
'# Cumulative
'# Beta = indicator.Library.Beta
If 10 <= Price.Last AndAlso _
Price.Last <= 50 AndAlso _
Volume.AVG(90) > 5000 AndAlso _
Price.Open < Price.XAVGC(21) AndAlso _
Price.Open < Price.XAVGC(8) AndAlso _
Price.Open < Price.XAVGC(4) AndAlso _
Price.Last > Price.XAVGC(21) AndAlso _
Price.Last > Price.XAVGC(4) AndAlso _
Price.Last > Price.XAVGC(8) AndAlso _
Price.Last > Price.Open AndAlso _
Price.Last(3) < Price.XAVGC(21, 3) AndAlso _
Price.Last(5) < Price.Last(3) AndAlso _
Price.Last(5) < Price.XAVGC(90) AndAlso _
Beta.Value > 1 AndAlso _
Price.STOC(10, 3) < 75 AndAlso _
Price.XAVGC(12) - Price.XAVGC(26) > _
Price.ExponentialAverage(12).XAVGC(9) - _
Price.ExponentialAverage(26).XAVGC(9) Then
Pass
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|