NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 09-03-2010, 06:45 AM   #1
supernatural
Junior Member
 
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default Bars information in custom plot

Hi,

I'm coding an indicator using custom plotting (overriding the Plot method) and let's say I need to draw, for each bar of the price panel, a simple rectangle in the indicator panel. For that, I need to know such things as what bars are displayed in the price panel (for example bar number 500 at position +200 pixels) and the space between each price bar. I don't see these informations in the CustomPlotSample indicator code so my question is what objects/variables can I use to obtain this kind of information?

Thanks
supernatural is offline  
Old 09-03-2010, 07:56 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

supernatural, this is unfortunately outside of our supported NinjaScript methods, however you can take a look at the PowerVolume indicators for example to get started (i.e. VolumeProfile).
NinjaTrader_Bertrand is offline  
Old 09-05-2010, 01:24 AM   #3
supernatural
Junior Member
 
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default

Ok...
At least, if a user has done it, how can I just get the X coordinate of a displayed price bar?
supernatural is offline  
Old 09-05-2010, 11:17 AM   #4
Mindset
Senior Member
 
Join Date: Mar 2008
Location: UK West Sussex
Posts: 665
Thanks: 9
Thanked 9 times in 7 posts
Default X co ord

supernatural do a search for ChartHelper in this forum. Some user posted a whole pile of methods to do with grabbing co ords and pixels that is really helpful.
The major difficulty (for me) was getting the bar index. If it's CurrentBar it is easy but historically it requires.. well you will see.

GetXByBarIdx() may also help you but NONE of this is supported....
Mindset is offline  
Old 09-05-2010, 12:45 PM   #5
supernatural
Junior Member
 
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default

Mindset, thanks for the help.
Yes, finally I could get the bar index by doing :
ChartControl.GetXByBarIdx(BarsArray[0], FirstBarIndexPainted)
for example for the first painted bar.
Last edited by supernatural; 09-05-2010 at 12:48 PM.
supernatural is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Custom Plot Values murfinp Indicator Development 6 08-24-2010 03:55 AM
Custom Plot Colours for SMA clippertm Indicator Development 5 03-30-2010 04:03 AM
Custom price channel indicator will not plot Lawnboy Indicator Development 3 02-03-2010 07:35 PM
Brokerage information vs position tab information tradervick Automated Trading 10 11-25-2009 06:34 AM
custom Plot() method AutoScale and PriceMarkers shawnj Indicator Development 0 06-08-2008 02:55 PM


All times are GMT -6. The time now is 01:29 PM.