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 |

Intraday High - newbie question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
keerthie
Posted : Sunday, August 2, 2009 7:43:30 PM
Registered User
Joined: 10/13/2005
Posts: 20
I searched the forum but could not find any information related to this. Is there a way to scan for stocks that are approaching intraday high using the RealCode? I have created a watch list using a certain criteria and I want to scan the list for any stock now approaching the intraday high (highlight the stock). Is it possible to do this?

Say the stock XYZ gained at the open and then later consolidated and now approaching the intraday high. I would like to highlight those in my watch list.

Thanks
Bruce_L
Posted : Monday, August 3, 2009 12:14:19 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I guess that would depend on how you define approaching. The following RealCode Rule is designed for use on an intraday Chart and should only return True if the current Price is above the Close of the previous Bar, the High of the current Bar is not the High of the Day and current Price is in the top 10% of the Price Range for the day. If this does not meet your needs, please provide an unambiguous objective definition of approaching so we can provide something that more closely matches your intent.

'# TopPercent = UserInput.Single = 10
Static DayHigh As Single
Static DayLow As Single
Static Valid(1) As Boolean
Static Check As Single
If isFirstBar Then
    DayHigh = Single.NaN
    DayLow = Single.NaN
    Valid(0) = False
    Valid(1) = False
    Check = (100 - TopPercent) / 100
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    DayHigh = Price.High
    DayLow = Price.Low
    Valid(0) = True
    Valid(1) = False
Else If Valid(0) = True Then
    Valid(1) = True
End If
DayHigh = System.Math.Max(DayHigh, Price.High)
DayLow = System.Math.Min(DayLow, Price.Low)
If Valid(0) = True Then
    If Valid(1) = True AndAlso _
        Price.Last > Price.Last(1) AndAlso _
        Price.High < DayHigh AndAlso _
        (Price.Last - DayLow) / (DayHigh - DayLow) >= Check Then
        Pass
    End If
Else
    SetIndexInvalid
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
keerthie
Posted : Monday, August 3, 2009 4:12:04 PM
Registered User
Joined: 10/13/2005
Posts: 20
Thanks Bruce. I knew my definition is bit ambiguous. I'll use this as an example and see if I can build on it. Thanks for your help. regards.
Pularis
Posted : Monday, August 3, 2009 9:22:11 PM
Platinum Customer Platinum Customer

Joined: 10/7/2004
Posts: 2
I have a question similar to the one asked above.How can I make a rule to identify intraday highs in a chart and also for a watchlist.Thanks
Bruce_L
Posted : Tuesday, August 4, 2009 9:09:55 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Pularis,
Please try the following RealCode Rule on an intraday Chart:

Static DayHigh As Single
Static Valid As Boolean
If isFirstBar Then
    DayHigh = Single.NaN
    Valid = False
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    DayHigh = Price.High
    Valid = True
End If
DayHigh = System.Math.Max(DayHigh, Price.High)
If Valid = True Then
    If Price.High = DayHigh Then
        Pass
    End If
Else
    SetIndexInvalid
End If

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