Registered User Joined: 5/19/2005 Posts: 100
|
Right now the count% new highs/lows indicator uses a set number of bars to determine if new highs or lows are being made. Is it possible to change so that it is more dynamic? so that it calculates if new intraday high or lows are being made? I am using it intraday...along with other time frames, I like to be able to see how many are making new intraday high/lows...Thanks, Eric
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
If you QuickEdit the indicator you can change the time period being used. If you have Mega Minute you can use QuickEdit to have it plot stocks making 10-hour lows or highs.
- Craig Here to Help!
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I have that...I have it set to 30 min high-lows, but I also want it to be dynamic, to show new day high, lows, not a set time.
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
10 hour high lows, will include the previous days data, won't it?
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I'm missing something...
You say you want it to be dynamic. Do you mean you want several plots that show new highs/lows for different periods?
Yes, 10-hours would include two trading days. Do you see the time-frame selection in the QuickEdit to change the time period of the bars?
- Craig Here to Help!
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
I have a study for this that will find what you want, but for some reason it's not plotting. Checking with development to see why.
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
Craig, I don't want it to show 2 days, only the current trading days new highs/ or lows. so during the first 1/2 or trading it shoudl only show 1/2 new highs, after 3 hours into the trading day, only show 3 hour new highs/lows, etc...got it?
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Gotcha... so % of stocks making new highs just for the day... so far. So for every list, it will be 100% in the first minute?
- Craig Here to Help!
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
yes...
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I don't mean to be a bother on this...you all have been so helpful on this board. Just checking in...has there been any progress on a solution to this? is it possible? Thanks, Eric
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
As I mentioned above on my July 2 post, I have a study put together but it's not working like it should. As soon as the developers can take a look at it and get it working I'll post it.
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
Just curious...were you ever able to get this working? Is there a solution available?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, They don't quite work the way I want yet, but you may wish to save the attached .pane files to:
My Documents\Blocks Files\Tool Parts\Chart
You can add them to any chart using the ADD STUDY button and then selecting Add Study | My Computer.
You can use QuickEdit to adjust the settings or view the Block Diagrams.
The Bar version makes its comparisons to the Daily High or Low up until that point in the day. The True version uses the previous Day's Close to allow comparisons to the True High or True Low instead.
I will warn you that they can be quite slow to calculate (especially for large Watchlists). You may want to limit yourself to small Watchlists and possibly limit the number of Bars in either the Studies themselves or under System | Blocks Data Manager.Attachments: Intraday High Low Percentage (Bar).pane - 23 KB, downloaded 828 time(s). Intraday High Low Percentage (True).pane - 27 KB, downloaded 820 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
thank you ver much...that is much appreciated... Do you have any updates on this. It is as you say, very computer intensive.
I wish there was a block that outputs the number of minutes since the open and that way I could just connect to that block instead of a fixed time block. I think that would solve it...
Thanks, Eric
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
actually that sounds like a good idea...I am going to create a code block that outputs an integer the number of minutes from the open.
so I have a question about that. when I select new block code, I want to create a code block with no input and just outputs an integer, but I don't see that option...
how do I do that?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, You will probably want to use Line to Line as the basis for your Custom Code Block. That will allow you to sync the count with the data against which you want to provide the number of minutes from the Open. Without this input your Custom Code Block would not know either the bar frequency or amount of history required for its output.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
The line to line returns a date number. I want to just return an integer...so that instead of having a fixed integer pointing the the minimum or maximum block, it can calculate the number of minutes from the open. Is there anything that returns an integer? for now I am ok with assuming I am looking at minute charts...so I don't need an input...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, All of the currently available Custom Code Block types return a Date & Number Series or TrueFalse Series with the exception of Text to Text which outputs Text. The Pre-Release Version has a Custom Code Block type that outputs Number & Number (but that's not what you want either).
Really the closest thing I can think of using the currently available Custom Code Block types would be Line to Line. You could have it process just the last value in the Date & Number Series if desired. It would be more versatile to create a version that processes the entire Date & Number Series input and limit the results using a Length Limit on the original data series however. You would need to use the Last Value in Series Block to get the desired value in either case (assuming you only want a single value).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I am still not seeing that will work. I might be looking at 400 bars of data...but i want this thing to start from the beginning of the day. the entier Date & number series won't always correlate to where I want it to start from, will it?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, The following Custom Code Block (created as Line to Line) assumes a 9:30am Open. It displays the number of minutes since the open for each InputDate in the Series (you will need to copy and paste using Firefox as IE does not seem to do this correctly):
<WBIGuid("642b1075-52a2-4226-bb8f-238cb54c5ec9"),FriendlyName("Minutes Since Open")> _ Public Class Minutes_Since_Open inherits BaseTemplateDLStoDLS Public Overrides Sub calculate() For bar As Integer = 0 To InputCount-1 AddToOutput(InputDate(bar),InputDate(bar).TimeOfDay.TotalMinutes-570) Next End Sub End Class
I'm sure it, or something similar, could be used to find the current number of minutes in the day when using the Last Number in Series Block on Price set to a Streaming 1 Minute Time Frame.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
thanks...but how do I connect this to the minimum or maximum block?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, If you wish to try versions using the Custom Code Blocks (which must be created first), you may wish to save the attached .pane files to:
My Documents\Blocks Files\Tool Parts\Chart
You can add them to any chart using the ADD STUDY button and then selecting Add Study | My Computer.
You can use QuickEdit to adjust the settings or view the Block Diagrams.
They should be the same as the originals except that they check for the Minutes Since Open to decrease to detect the start of a new day instead of using the Interpolate Block method used in the originals. While they seem to be a bit quicker than the originals, they are still a fairly slow.Attachments: Intraday High Low Percentage (Bar-CCB).pane - 20 KB, downloaded 715 time(s). Intraday High Low Percentage (True-CCB).pane - 24 KB, downloaded 714 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I'll check it out...I was there was an easier way to subtract 2 dates and get the number of minutes...
Thanks for all your time...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, You may want to take a look at the TimeSpan (Date Subtract) and TimeSpan Parser Blocks.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
ok I think I got it...shouldn't the below diagram calc the number of minutes since the open? just one question about the TimeSpan parser block. It has several outputs...minute, hour, etc...I just want the minute...but how do I know which is the minute? nothing is labeled...also, is it possible to test it and see the results of just this diagram so I know that it is returning the correct values?
thanks...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, It appears that the Connector Style for your Block Diagram is currently set to None. Left-click where it says None to the right of where it says Connector Style and select something else (you may want to try out the different Connector Styles).
You would actually need to multiply the hours by 60 and add the result to the minutes to get the desired result. This would require using Convert: IntegerToSingle Blocks on the Hour and Minute outputs before you could use the Multiply and Add Blocks to actually do the math.
Actual testing should probably be done while the market is open.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I just want to veryify that it is properly returning number of minutes from the open...can't I get this to plot seperately..just plot the current value...
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
oh I see the prlbme now...it is using the current time...but it needs to use the time of the bar instead...how do I get the time of the current bar instead of Date.Now?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, If you really want to do experiments while the market is closed, you could try using Last Updated Date, Parameter: Date, Bar Chart.Start Date, Bar Chart.End Date or Bar Chart: Date Pointer.
That said, actual testing to see how the technique works while the market is open probably still needs to wait until the market is actually open.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
my chart updates every tick...so I don't think it will work realtime...only the most recent bar will be correct. but it will make back data wrongevery time it recalculates.
I thought I could get the current date of the current bar that is being calculated...
but I see now that that is not really possible because everything is calculated in their own individual loops...
so...
I guess after all this, I am back to square one...
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
I think I have to recreated the maximum block with my own code block, so that as it calculates the maximum value over a period of prices, it dynamically knows what period to use...
how does that sound?
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
ok...I think I got it working...like I described in my last post...really thanks for all your time and help...
I can post the code if you like...
-Eric
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, I would be interested in seeing the code and I'm sure other readers would be as well.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/19/2005 Posts: 100
|
This is the code for Maximum of Day...this replaces the Maximum block on the percent of stocks making new highs.
Public Class Maximum_Of_Day
inherits BaseTemplateDLBToDLS Public Overrides Sub calculate() Dim dayHigh As Integer Dim currentDate As Date For x As Integer=1 To inputcount-1 if (x=1) then currentDate=inputdate(x) End If If (inputDate(x).Month=currentDate.Month And inputDate(x).Year=currentDate.Year And inputdate(x).Day=currentDate.Day) dayHigh=System.Math.Max(dayHigh, inputlast(x)) Else currentDate=inputdate(x) dayHigh=inputlast(x) End If addtooutput(inputdate(x), dayHigh) Next End Sub End Class
below is the Minimum of Day function that replaces the minimum blcok on the percent of stocks making new lows
Public Class Minimum_of_Day inherits BaseTemplateDLBToDLS Public Overrides Sub calculate() Dim dayLow As Integer Dim currentDate As Date For x As Integer=1 To inputcount-1 If (x=1) Then currentDate=inputdate(x) dayLow=inputlast(x) End If If (inputDate(x).Month=currentDate.Month And inputDate(x).Year=currentDate.Year And inputdate(x).Day=currentDate.Day) ' If (inputdate(x)<=Date.Now) dayLow=System.Math.Min(dayLow, inputlast(x)) Else currentDate=inputdate(x) dayLow=inputlast(x) End If ' End If addtooutput(inputdate(x), dayLow) Next End Sub End Class
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
nissane, Very nice. Thank you for posting your code.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |