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 |

Gaps Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
hakim2
Posted : Monday, June 29, 2009 5:14:25 PM
Registered User
Joined: 3/5/2005
Posts: 7
I would like to set up a rule that finds the stocks in a watchlist that have gapped up (or down)
at the opening of the market in the morning, and list them along with the gap magnitues. 

I do not want the results to change as the time passes or interval changes. The results should 
be always for the opening gap.

Thanks,

Hossein
 
Julia_O
Posted : Tuesday, June 30, 2009 2:57:00 PM


Worden Trainer

Joined: 4/26/2007
Posts: 508
Hi Hossein,

The easiest way to do this is to create a quick RealCode indicator using this code:

plot = price.open(0)-price.high(1) 

Use this on a daily chart; then you can sort by the value of this plot, so that those stocks with the greatest gaps (if there are any in the list that gapped) are brought to the top of the list.

Let me know if you need any additional help with this.

Best,
Julia
hakim2
Posted : Wednesday, July 1, 2009 4:14:48 PM
Registered User
Joined: 3/5/2005
Posts: 7
Hi Julia,

The plot that you have suggested changes as time passes. Because it calculates the 
price difference between the open price of the current bar and the high of previous bar.
 
This is not what I want. I would like  to know the gap at opening of the market (around 9:30). 
This is difference between the price when the market opens and high of the previous day.   
 
Hossein
Bruce_L
Posted : Tuesday, July 7, 2009 8:10:06 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
hakim2,
An Indicator that is similar to the 1-Day version provided by Julia that will Plot the difference between the current day's Open and the previous day's High on 1-Day Charts but adds intraday Charts as well would be:

Static OpenGap As Single
If isFirstBar Then
    OpenGap = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    OpenGap = Price.Open - Price.High(1)
End If
Plot = OpenGap

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