FaDirt |
Gold User, Member, Platinum User, TeleChart
|
Registered User |
|
|
|
|
Unsure |
|
Thursday, October 7, 2004 |
Wednesday, October 16, 2019 4:56:34 PM |
28 [0.01% of all post / 0.00 posts per day] |
|
I was able to get my results using the following code:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:New Intraday Highs AFTER 10:30 am
'|******************************************************************
Static Count As Single
Static DayHigh As Single
If isFirstBar Then
Count = Single.NaN
DayHigh = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
Count = 0
DayHigh = Price.High
End If
If Price.High > DayHigh Then
DayHigh = Price.High
If Price.DateValue.TimeOfDay > Date.Parse("10:30").TimeOfDay Then
Count += 1
End If
End If
Plot = Count
Not sure why the Date.Parse code worked better for me but I'll take it. Thanks for assisting me Bruce.
|
Sorry Bruce. I don't quite follow...I see the differences between the code but I don't see what you did wrong the first time. The code I currently use that you did the first time doesn't seem wrong since it accurately provides the results I'm looking for. The latest code with the TimeOfDay.Hours > 10.5 is the one that isn't providing the results I'm looking for. Sorry for any confusion. I'm trying to have two data columns in my watchlist. One that shows the number of new intraday highs for the entire day . And the other that shows the number of intraday highs strictly after 10:30 am. Again, I appreciate all your help! I'm an amateur with regard to programming the RealCode.
Don
|
Hi Bruce,
When I use this code I cannot validate the results. For example, today using a 5 min bar interval I get a count of 4 for MAN. The 11 am , 11:05am, and 11:10am are being counted but they shouldn't be since they are not new highs.
Another example is PNC. Between 11 am and 11:40 am new highs are being counted but new highs are not being made.
Any thoughts on what is wrong?
|
Hi Bruce,
This code your wrote works great. Is there a way to count new highs ONLY after the first 60 minutes of trading? So new highs after 10:30 am? I'm not sure how to go about programming this. Any assistance would be greatly appreciated. Thanks.
|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:New Intraday Highs
'|******************************************************************
Static Count As Single
Static DayHigh As Single
If isFirstBar Then
Count = Single.NaN
DayHigh = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
Count = 1
DayHigh = Price.High
End If
If Price.High > DayHigh Then
Count += 1
DayHigh = Price.High
End If
Plot = Count
|
Thanks Bruce...I got the Above/Below Indicator to work. Regarding the Hourly Time Frame, is one method easier than another? Does one method affect the performance more than the other? And can you point me to where I could learn to do what you suggested (adjust Block Diagrams, create RC with Class tab)? Thanks.
Don
|
Hi Bruce,
Can this type of logic be done in TC2000 too or is it strictly limited to Stockfinder?
|
Bruce,
The data values don't see to be giving me what I need. I was looking for how much above or below the open the current price is. The value seem to small.
Also, I like to use the 60 min chart but in Stockfinder the hourly chart is based off the top of the hour and not the bottom of the hour. So the first hourly bar is only 30 minutes. I want to see the hourly chart based off of the 9:30 am market open. So the first 60 min bar would complete at 10:30 am and not 10 am. Anyway to modify this in Stockfinder?
|
Hi Bruce,
I'm trying to create RealCode for determining if the current price of a stock is above or below its opening price and by how much (in real time). I want to be able to use this condition on any bar interval and also want to have the value reflected as a Watchlist column. Also, if the price is above the open the value or cell in the watchlist would be highlighted in green and if the price is below the open the value would be highlighted in red. I looked in the forum and didn't see any example code that I could use. Any help you can provide would be very much appreciated. Thanks.
-Don (fadirt)
|
Bruce, I would use the open to determine my long or short bias. If the current price is above the open I want to filter (for longs) for stocks that have not retraced (pulled back) more than 31.8% ( I may use 50% or 61.8% later) of their intraday range and just the opposite (for shorts). If the current price is below the opening price and the stock has not retraced (bounced) more than 38.2%. As I mentioned earlier, having a visual line(s) drawn would be great.
|
Hi Bruce,
Is it possible to program Stockfinder to indentify stocks that on an intraday basis have not retraced more than a specified retracement level from their intraday low/high? For example if I want to indentify which stocks open and travel up from their open and have not retraced more than 38.2% (or 50%) from their intraday low can this be done? Even better yet is there a way to draw a line that represents the 38.2% or 50% area? Any hints or suggestions are appreciated. Thanks.
Don
|
|