![]() |
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
|
I'm trying to include a Parameter in the Indicator Window that I can type Text into that will show up on Price Panel.
Code:
DrawText("tag1", "This text was written from Indicator Window", 10, 1000, Color.Black);
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Not sure I follow. What indicator window are you talking about? If you mean where you set indicator parameters, just create yourself a string input and then tell it to DrawText on that string variable.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
|
Yes. I was refering to Indicator Window via the Chart...
I would assume that some code is needed in the Properties region. Kinda struggling with it right now...Maybe if I can post some code we can go from there Thank You Josh |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
duck_CA,
I recommend you just use the Indicator Wizard to see what kind of code it will generate. That is the code you will need in the Properties region.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
|
I will ask the "wizard" or is that you ? lol
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Haha. Tools->New NinjaScript->Indicator.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
|
I'm trying to be able and use the new "Text" Parameter so that anything that is typed will show up on the chart...
I'm I getting warmer? Code:
#region Variables // Wizard generated variables privatestring text = @"draw text here"; // Default setting for Text // User defined variables (add any user defined variables below) #endregion Code:
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (Low[0] < High[0])
{
DrawText("My text" + CurrentBar, "draw me some text", 0, 0, Color.Red);
}
}
Code:
#region Properties
[Description("this should draw text in indicator window")]
[Category("Parameters")]
publicstring Text
{
get { return text; }
set { text = value; }
}
|
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
DrawText("My text" + CurrentBar, Text, 0, 0, Color.Red);
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
|
On to the next item... Thanks Josh !
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Colored text in output window? | heech | Strategy Development | 1 | 03-03-2009 10:02 AM |
| connections option window | accudoc | Connecting | 1 | 12-24-2008 03:59 AM |
| Output window text | kenzo | Strategy Analyzer | 3 | 12-12-2008 10:30 AM |
| Positioning text using DrawText() | higler | General Programming | 7 | 07-15-2008 01:36 AM |
| Drawing Text at the right/left of the chart window? | pbastowski | Indicator Development | 7 | 06-07-2007 09:47 PM |