Registered User Joined: 3/30/2008 Posts: 97
|
What would the RealCode be for the following two separate conditions/scenarios:
First Condition: a 3-day uptrend, with each succeeding day having both higher highs and higher lows, with the last of the 3 days painted a color of some sort
and,
Second Condition: a 3-day downtrend with each succeeding day having lower highs and lower lows, again with the 3rd painting a different color.
I'm setting a trade library, and am in the middle of learning realcode.. but definitely have a ways to go.
Thanks.
P.S. I LOVE Stockfinder... I'm really getting into it now that I have a faster machine.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can Drag and Drop a Rule to an Indicator to Paint that Indicator using the Rule.
Rule Basics
QUOTE (lordnel) First Condition: a 3-day uptrend, with each succeeding day having both higher highs and higher lows, with the last of the 3 days painted a color of some sort
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Uptrend
'|******************************************************************
'# Period = UserInput.Integer = 3
Static Count As Integer
If isFirstBar Then
Count = 0
Else If Price.High > Price.High(1) AndAlso _
Price.Low > Price.Low(1) Then
Count += 1
Else
Count = 0
End If
If Count >= Period Then Pass
QUOTE (lordnel) Second Condition: a 3-day downtrend with each succeeding day having lower highs and lower lows, again with the 3rd painting a different color.
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Downtrend
'|******************************************************************
'# Period = UserInput.Integer = 3
Static Count As Integer
If isFirstBar Then
Count = 0
Else If Price.High < Price.High(1) AndAlso _
Price.Low < Price.Low(1) Then
Count += 1
Else
Count = 0
End If
If Count >= Period Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|