Registered User Joined: 10/7/2004 Posts: 6
|
Dear Bruce,
Can you help me to write following 2 real codes?
1. Today's up volume equals to or greater than largest down volume day over the prior 10 days
2. Price forms a tight base with 5-8 weeks
Thanks a lot in advance!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (tjguo) Today's up volume equals to or greater than largest down volume day over the prior 10 days
RealCode for Real People: Indicators
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Up above Max Down Volume
'|******************************************************************
'# Period = UserInput.Integer = 10
If CurrentIndex > Period Then
If Price.Last > Price.Last(1) Then
Dim Test As Boolean = True
For i As Integer = 1 To Period
If Price.Last(i) < Price.Last(i + 1) AndAlso _
Volume.Value <= Volume.Value(i) Then
Test = False
Exit For
End If
Next
If Test = True Then
Pass
End If
End If
Else
SetIndexInvalid
End If
QUOTE (tjguo) Price forms a tight base with 5-8 weeks
This would require an unambiguous objective definition of "tight base" from you.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 10/7/2004 Posts: 6
|
Bruce,
Thanks so much for your help. It works very well.
I also tried to use RS vs. SP500 to watch out stock's relative strength, created condition of RS vs. SP 500 in 20 day new High, and use it as filter, but nothing comes out, however it can use to sort the watchlist.
Then I created another condition of RS vs. SP 500 above 20 day MA, but it does work as filter or sort. Please advise what is the right way to make conditions for:
RS vs. SP 500 > 20MA
RS vs.SP 500 20 day high
Thanks again!
|