[FONT=Courier New]DrawText("tag1", "[COLOR=red][B]This text was written from Indicator Window[/B][/COLOR]", 10, 1000, Color.Black);[/FONT]
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
DrawText with Text Option in Indicator Window
Collapse
X
-
DrawText with Text Option in Indicator Window
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:Tags: None
-
Draw Text in Indicator Window
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:[FONT=Courier New][SIZE=2][COLOR=#0000ff]#region[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] Variables[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#008000]// Wizard generated variables[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] text = [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]@"draw text here"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]; [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000]// Default setting for Text[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#008000]// User defined variables (add any user defined variables below)[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]#endregion[/COLOR][/SIZE][/FONT]
Code:[FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] OnBarUpdate()[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#008000]// Condition set 1[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] (Low[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] < High[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]])[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [SIZE=2][FONT=Courier New]DrawText([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]"My text"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + CurrentBar, [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"draw me some text"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], Color.Red);[/SIZE][/FONT] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
Code:[FONT=Courier New][SIZE=2][COLOR=#0000ff]#region[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] Properties[/SIZE][/FONT] [SIZE=2][FONT=Courier New][Description([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]"this should draw text in indicator window"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])][/SIZE][/FONT] [SIZE=2][FONT=Courier New][Category([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]"Parameters"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] Text[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [FONT=Courier New][SIZE=2][COLOR=#0000ff]get[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] { [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] text; }[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000ff]set[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] { text = value; }[/SIZE][/FONT] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment