![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
I am trying to use DrawText() in an indicator on Volume (so it is in the Volume Pane 2 and not the Price Panel). No output appears.
Do these Draw routines work in other panes?? If not, how can I add a mark to Volume bars? e.g., a single text character just over the volume bar? |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please set DrawOnPricePanel = false.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
Oddly enough, Josh, I already did that in the Initialize() method.
DrawOnPricePanel = false; It did not help... :-) Any other suggestions? What I started with is VERY simple: if (Volume[0] > Volume[1]) // increasing bar-to-bar DrawText("V"+CurrentBar, riseMarker, 0, Volume[0], tColor); even tried the looong version: DrawText("V"+CurrentBar, true, riseMarker, 0, Volume[0], yPixels, tColor, fp, StringAlignment.Center, Color.Empty, Color.Empty, 10) ; BTW, the varibles yPixelOffset in the doc says double but generates an error if not int. |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
yPixelOffset is suppose to be an integer. You cannot offset a decimal pixel value.
Check your Control Center logs for errors. Have you run into this? http://www.ninjatrader-support2.com/...ead.php?t=3170
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
Ah! I do not know why I forget to check the log when changing an indicator. I had removed the check for CurrentBar < 1 because I added BarsRequired = 2 -- silly me thinking that covered it. Thank you.
BTW, you should update your online help text for DrawText() which says that yPixelOffset is a double. :-) |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DrawText into Data Box | tb2000 | General Programming | 6 | 12-10-2009 06:25 PM |
| DrawText and DrawTextFixed | TAJTrades | General Programming | 8 | 12-19-2008 10:24 AM |
| Drawtext | spenbm01 | Miscellaneous Support | 3 | 06-06-2008 11:23 PM |
| DrawText | Mike Winfrey | General Programming | 1 | 12-21-2007 04:57 PM |
| DrawText, DrawLine, etc... | funk101 | Indicator Development | 2 | 05-27-2007 01:13 PM |