Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
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
|
|
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
|
|
Guest-1 |