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 |

3-day trends... Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
lordnel
Posted : Friday, March 5, 2010 2:19:28 PM
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.

Bruce_L
Posted : Friday, March 5, 2010 2:36:15 PM


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
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.