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 |

MaxHigh Condition and Paintbrush Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
zl
Posted : Tuesday, August 19, 2008 12:21:48 PM
Registered User
Joined: 10/12/2007
Posts: 10
How would I write a condtion to find a price.maxhigh(period) followed by three days where the high did not take out the maxhigh and then use this condition to paint all four bars on the chart?  I have been able to write a condition but it only paints the last bar of the condition and I would like it to paint all four bars.
Bruce_L
Posted : Tuesday, August 19, 2008 12:31:53 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Something like the following RealCode Condition should work:

'# Period = UserInput.Integer = 20
If (Price.High(3) = Price.MaxHigh(Period,3) And _
    Price.MaxHigh(3) <= Price.MaxHigh(Period,3)) Or _
    (Price.High(2) = Price.MaxHigh(Period,2) And _
    Price.MaxHigh(3,-1) <= Price.MaxHigh(Period,2)) Or _
    (Price.High(1) = Price.MaxHigh(Period,1) And _
    Price.MaxHigh(3,-2) <= Price.MaxHigh(Period,1)) Or _
    (Price.High = Price.MaxHigh(Period) And _
    Price.MaxHigh(3,-3) <= Price.MaxHigh(Period)) Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
zl
Posted : Tuesday, August 19, 2008 12:38:45 PM
Registered User
Joined: 10/12/2007
Posts: 10
Thank you very much.  Worked perfectly.
Bruce_L
Posted : Tuesday, August 19, 2008 12:41:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
zl
Posted : Tuesday, August 19, 2008 12:56:40 PM
Registered User
Joined: 10/12/2007
Posts: 10
Now I would like to know if there is a way to expand upon this condition.  Can we find the min low after the aforementioned maxhigh and find three days after the minlow with higher lows which do not take out the max high.  I know we will have period issues but just say it has to happen within 20 periods. 
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.