![]() |
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 |
|
Member
Join Date: Jul 2008
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
I want to draw a single dot & text in the MACD indicator panel when a condition is met. I have modified my own MACD, and tried using the DrawDot function, but that draws the dot on the price panel.
Can this only be done by adding another Add(new Plot... function? Can you please point me in the right direction on how to do this? Thank you. UPDATE TO QUESTION: i figured out how to draw a single dot on the indicator panel. Now I would like to know how to draw text on the indicator panel(below the dot). Thanks.
Last edited by zacharydw00; 07-21-2009 at 02:05 PM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
Hi Zac, I know I've seen the code somewhere. Give me a few minutes and I'll find it.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
The property you're looking for is DrawOnPricePanel. Here is a link that will take you to the help guide reference for DrawOnPricePanel.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2008
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
I figured out how to draw a single dot in the indicator panel. Now I would like to know how to draw text in the indicator panel(below the dot). The DrawText function does not seem to work.
Thanks.
Last edited by zacharydw00; 07-21-2009 at 02:18 PM.
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
Zac, setting DrawOnPricePanel = false should force all Draw objects onto the indicator panel. I edited the MACD indicator a little to help me help you. You can see that it draws text and dots in the indicator window. I've also attached the indicator that I created so you can see what works--the relevant section is from line 77 to line 91.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Member
Join Date: Jul 2008
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
Maybe it's something on my end. A global setting or something. When I load your macd2, no text shows up in the indicator panel, but the dots do. I copied the drawtext line from your macd2 into my macd, but the text did not print
. I uploaded my macd for you to verify.Thanks.
Last edited by zacharydw00; 10-01-2009 at 11:02 PM.
|
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
The version you posted is a little complicated for debugging purposes, so we'll use mine to find out why the text isn't being drawn.
I'll outline a few steps for you to try so we can pin this down:
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Member
Join Date: Jul 2008
Posts: 78
Thanks: 0
Thanked 0 times in 0 posts
|
For some reason restarting Ninja fixed the text problem this time. I did restart Ninja last time, but it did fix the text problem.
Well thanks... it's all working now.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Panel drawing selection from Strategy | saltminer | Charting | 12 | 12-06-2010 08:40 AM |
| Single dot swing high/low | raycam | Indicator Development | 5 | 03-20-2009 07:16 AM |
| Removing Single Drawing Object? | wannabeninjatrader | Charting | 2 | 01-18-2009 10:03 AM |
| Drawing objects in a strategy other than in Chart Panel 1(Price) | JT454 | Strategy Development | 1 | 11-07-2008 03:43 PM |
| Indicator writing to own panel and price panel | cherriman | Indicator Development | 6 | 10-13-2008 03:14 PM |