TIA
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Anchoring an Indicator to the start of a session
Collapse
X
-
Anchoring an Indicator to the start of a session
I created a horizontal histogram indicator that currently plots on the LH side of a chart. I'd like to anchor that histogram to the open of a session if the open is currently displayed on the chart. Can anyone point me to an indicator or some sample code that does this?
TIA -
Thanks Brett, I am already overriding Plot to create my horiz. histogram but have not figured out how to determine if the session open is on the chart and how to anchor the base of the histogram to the open when it is being plotted, ie - is the session open on the chart and how do I determine the x coord to start painting my histogram, both can likely be resolved with the same info.
I will also want to do the same for every session as I scroll back through the chart but that should be easy once I can get the last session to anchor as described (Create a class to handle the histogram paint and instantiate a new class for each session) .
Cheers,
Paul
Comment
-
Originally posted by paulca View PostThanks Brett, I am already overriding Plot to create my horiz. histogram but have not figured out how to determine if the session open is on the chart and how to anchor the base of the histogram to the open when it is being plotted, ie - is the session open on the chart and how do I determine the x coord to start painting my histogram, both can likely be resolved with the same info.
I will also want to do the same for every session as I scroll back through the chart but that should be easy once I can get the last session to anchor as described (Create a class to handle the histogram paint and instantiate a new class for each session) .
Cheers,
Paul
Comment
-
Originally posted by koganam View PostUse FirstBarOfSession to key off the start of your drawing.
Comment
-
Originally posted by paulca View PostThanks, that's the easy part. The more difficult prob. is how to determine if the open is currently visible on the chart and, if so, how to determine the chart X value to know where to start the plot. I'm looking to see if internal classes ChartControl and/or ChartHelper will give me what I need. If you have any other ideas I'm open to suggestions.
ChartControl.GetXByBarIdx(ChartControl.LastBarPain ted);
ChartControl.GetXByBarIdx(ChartControl.FirstBarPai nted);
Needless to say, they are unsupported.
You may also want to look in the code for the VolumeZones indicator. It pretty much does what you are trying to do, so you should be able to get some ideas in there.Last edited by koganam; 05-24-2011, 04:24 PM.
Comment
-
Originally posted by koganam View PostYou may also want to look in the code for the VolumeZones indicator. It pretty much does what you are trying to do, so you should be able to get some ideas in there.
Comment
-
The shipping NT version of the Volume Profile works only with realtime data, and is erased if one loads the chart after market hours.
I was thinking of writing a version that stays on the chart, a la Market Profile, or Volume Profile from many other vendors. Is that perchance what you are currently writing?
Maybe, I can exchange something for it, once you are done? I really would rather not reinvent the wheel, if you know what I mean.
Comment
-
Originally posted by koganam View PostThe shipping NT version of the Volume Profile works only with realtime data, and is erased if one loads the chart after market hours.
I was thinking of writing a version that stays on the chart, a la Market Profile, or Volume Profile from many other vendors. Is that perchance what you are currently writing?
Maybe, I can exchange something for it, once you are done? I really would rather not reinvent the wheel, if you know what I mean.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Shansen, 08-30-2019, 10:18 PM
|
25 responses
949 views
0 likes
|
Last Post Today, 07:01 AM | ||
Started by JonesJoker, 04-22-2024, 12:23 PM
|
8 responses
41 views
0 likes
|
Last Post
by JonesJoker
Today, 06:47 AM
|
||
Started by timko, Today, 06:45 AM
|
0 responses
3 views
0 likes
|
Last Post
by timko
Today, 06:45 AM
|
||
Started by Waxavi, 04-19-2024, 02:10 AM
|
2 responses
39 views
0 likes
|
Last Post
by poeds
Today, 06:37 AM
|
||
Started by chbruno, Yesterday, 04:10 PM
|
1 response
44 views
0 likes
|
Last Post Today, 06:36 AM |
Comment