Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Drawing Arrows and Text in Price or Indicator area
Collapse
X
-
Drawing Arrows and Text in Price or Indicator area
I have created an indicator that I want to use DrawArrowUp, DrawArrowDown and DrawText to alert me to a condition where I want to enter a trade. When I use the Draw functions they print in the indicator area. I would like to print them in the price area with the price bars. How do I get the Draw functions to print in the price area?Tags: None
-
Bob, you could work with DrawOnPricePanel for this - http://www.ninjatrader-support.com/H...ceOnPanel.html
-
Great - you would need to use the extended DrawText overload offering a font parameter - http://www.ninjatrader-support.com/H.../DrawText.html
Comment
-
This is what I m using
private Font textFont = new Font("Arial", 8);
DrawText(CurrentBar.ToString() + "c", true, Open[0].ToString(), 0, High[0] + TickSize * 10, Color.HotPink, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
How do I make the font bold?
Comment
-
I have a question about arrow and text placement. How is the location for the arrow and text figured?
I have seen examples using TickSize for placement on the price panel but the arrow seems to take a variable amount of ticks depending on what I am trading. The following code places the text just above the arrow on ES. For example the high is 1099.75, the point of the down arrow is 1100.25, the top of the arrow is 1101.25 and the bottom of the text is 1101.25 so the text is 10 ticks above the high. On TF I have a high of 621.7, the bottom of the arrow is 621.8, the top of the arrow is 622.0 and the bottom of the text is 622.3. That is only 6 ticks.
DrawArrowDown(CurrentBar.ToString() + "b", true, 0, High[1] + TickSize, Color.HotPink);
DrawText(CurrentBar.ToString() + "c", true, Open[0].ToString(), 0, High[0] + TickSize * 10, Color.HotPink, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
I would also like to know what unit of measure is used for placement in the indicator panel.
ThanksLast edited by BobTN; 02-25-2010, 12:40 PM.
Comment
-
Thanks. You are correct. I found a coding error. I was using High[0] when I meant to use High[1].
Both of you have been very helpful. I just have one more question and then I swear I will leave you alone... at least until I have my next coding challenge. LOL
Is there any way to make the arrow wider for the DrawArrowUp or DrawArrowDown?
Comment
-
I am still having problems. I am using the following code
DrawOnPricePanel = true;
DrawArrowUp(CurrentBar.ToString() + "l", true, 0, Low[1] - TickSize, Color.PaleGreen);
DrawText(CurrentBar.ToString() + "m", Open[0].ToString(), 0, Low[1] - 8 * TickSize, Color.PaleGreen);
The arrows draw in the price panel but the text is in the indicator area. What am doing wrong?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
550 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment