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 |

Help creating a watch list filter for stocks crossing the high of the 1st 15 minutes of trading Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
EQUIROGA
Posted : Monday, February 22, 2016 10:19:03 PM
Registered User
Joined: 4/30/2009
Posts: 3

Hello Bruce

 

I came across a previous topic were you helped a customer create a realcode indicator to plot the high of the first 15 minutes of trading. The code you develope is shown below. I need some help to come up with a condition that will allow me to filter a watchlist based on the stocks that are crossing above the 15 minute high bar.  I would appreciate any guidance you can provide.

lease try something similar to the following RealCode Indicator instead:

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Opening 15-Minute High
'|******************************************************************
Static Open15MinHigh As Single
If isFirstBar Then
	Open15MinHigh = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
	Open15MinHigh = Price.High
Else If Price.DateValue.TimeOfDay <= Date.Parse("09:45").TimeOfDay Then 
	Open15MinHigh = System.Math.Max(Open15MinHigh, Price.High)
End If
Plot = Open15MinHigh
 

 

Regards

Bruce_L
Posted : Wednesday, February 24, 2016 12:31:11 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The following RealCode Condition assumes you are using a 1, 3, 5 or 15 minute time frame. It also assumes that crossing up means that price is currently above the high of the first 15 minutes but closed at or below that high during the previous bar.

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:xUp Opening 15-Minute High
'|******************************************************************
Static Open15MinHigh As Single
If isFirstBar Then
	Open15MinHigh = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
	Open15MinHigh = Price.High
Else If Price.DateValue.TimeOfDay <= Date.Parse("09:45").TimeOfDay Then 
	Open15MinHigh = System.Math.Max(Open15MinHigh, Price.High)
Else If Price.Last > Open15MinHigh AndAlso Price.Last(1) <= Open15MinHigh Then
	Pass
End If
If Single.IsNaN(Open15MinHigh) Then
	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.