![]() |
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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).
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
|
Ok...
At least, if a user has done it, how can I just get the X coordinate of a displayed price bar? |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2008
Location: UK West Sussex
Posts: 665
Thanks: 9
Thanked 9 times in 7 posts
|
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.... |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2009
Location: Western Europe
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
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 |