Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
current and previous bars highs and lows prints on the chart
Collapse
X
-
There is a line the code -
I would recommend changing the 2 * TickSize to either a larger number or lower number as this is the y-value where the Text is drawn.Code:DrawText("cl", currentLow.ToString(), 0, Low[0] - 2 * TickSize, Color.Black);
Both are being placed correctly on the chart however, they are simple close to each other and you can separate them out by changing the code or expanding the bar spacing on the chart(Ctrl + Up/down Arrow)Cal H.NinjaTrader Customer Service
Comment
-
I did change the 2 to a higher number, still overlapping.
even when using CTRL+ up/down, still they overlap.
As for saving the other indicator using different name, when I click teh right mouse button, I am not getting any options to save as?
please advise
Comment
-
The first HiLow indicator(developed by Matthew) seems more practical since the prices don't over lap each other in real time action.
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
But I need to change the font size and text color if possible. I tried to edit the script but cannot find a way to change the size or the color, I would appreciate it if you can add that option.
As for the timer, if you check the last line on the following screen shot:
http://charts.dacharts.net/2014-02-1...02-13_1205.png
where it is showing the time period it took for the previous and the current bar to print from start to finish/current) It would be nice to be able to add this option on this high low version if it doesn't affect the performance of NT in fast markets.
Your feedback is highly appreciated
Comment
-
To do what you want, you will have to align your strings. Use the correct syntax for DrawText(), to draw as you want. In this particular case, you must replace your statement that are drawing your text with this:Originally posted by GussJ View PostI did change the 2 to a higher number, still overlapping.
even when using CTRL+ up/down, still they overlap.
As for saving the other indicator using different name, when I click teh right mouse button, I am not getting any options to save as?
please advise
Code:using (Font outputFont = new Font("DefaultMonoSpace", 6f)) { DrawText("ch", true, currentHigh.ToString(), -1, High[0], 10, Color.Black, outputFont, StringAlignment.Near, Color.Empty, Color.Empty, 0); DrawText("cl", true, currentLow.ToString(), -1, Low[0], -10, Color.Black, outputFont, StringAlignment.Near, Color.Empty, Color.Empty, 0); DrawText("ph", true, previousHigh.ToString(), 0, High[1], 10, Color.Black, outputFont, StringAlignment.Far, Color.Empty, Color.Empty, 0); DrawText("pl", true, previousLow.ToString(), 0, Low[1], -10, Color.Black, outputFont, StringAlignment.Far, Color.Empty, Color.Empty, 0); }
Comment
-
Thanks a lot for your help, your code just fixed it. much appreciate.Originally posted by koganam View PostTo do what you want, you will have to align your strings. Use the correct syntax for DrawText(), to draw as you want. In this particular case, you must replace your statement that are drawing your text with this:
Code:using (Font outputFont = new Font("DefaultMonoSpace", 6f)) { DrawText("ch", true, currentHigh.ToString(), -1, High[0], 10, Color.Black, outputFont, StringAlignment.Near, Color.Empty, Color.Empty, 0); DrawText("cl", true, currentLow.ToString(), -1, Low[0], -10, Color.Black, outputFont, StringAlignment.Near, Color.Empty, Color.Empty, 0); DrawText("ph", true, previousHigh.ToString(), 0, High[1], 10, Color.Black, outputFont, StringAlignment.Far, Color.Empty, Color.Empty, 0); DrawText("pl", true, previousLow.ToString(), 0, Low[1], -10, Color.Black, outputFont, StringAlignment.Far, Color.Empty, Color.Empty, 0); }
Is there a way to change the size of the font and make it bold if needed?
Also does this code use resources or affects the performance of NT in fast markets?
One last thing, Is there a way to add a timer for each bar at the top or bottom of the panel(possibly as an independent indicator ) to represent the time it took from start to finish of each bar? similar to the last line on the following chart
http://charts.dacharts.net/2014-02-1...02-13_1205.png
Thanks again your help is highly appreciatedLast edited by GussJ; 02-13-2014, 07:06 PM.
Comment
-
Change the definition of outputFont to be what you want. Use a search engine to look up how to define fonts.Originally posted by GussJ View PostThanks a lot for your help, your code just fixed it. much appreciate.
Is there a way to change the size of the font and make it bold if needed?
Also does this code use resources or affects the performance of NT in fast markets?
One last thing, Is there a way to add a timer for each bar at the top or bottom of teh panel to represent the time it took from start to finish? similar to teh last line on teh following chart
http://charts.dacharts.net/2014-02-1...02-13_1205.png
Thanks again your help is highly appreciated
The time elapsed is Time[0] - Time[1]. Just add another statement to draw its value wherever you want it.Last edited by koganam; 02-13-2014, 07:09 PM.
Comment
-
Thanks again for your reply.Originally posted by koganam View PostChange the definition of outputFont to be what you want. Use a search engine to look up how to define fonts.
The time elapsed is Time[0] - Time[1]. Just add another statement to draw its value wherever you want it.
I am totally new to NT programing, so I have no idea where to start, but thanks a lot for your input and feedback, much appreciated.
I will look it up as you suggested.
Thanks again
Any feedback from NT support on the above is highly appreciatedLast edited by GussJ; 02-13-2014, 07:57 PM.
Comment
-
Larger Font
Dear Matthew and Cal,
I would appreciate it if you can help me increase the font size of the following attached indicator.
Thanks to Koganam for his input and coding.
I am a trader, and don't know much about NT coding and language,I would appreciate your help with that.
Thanks in advanceAttached Files
Comment
-
Thanks Cal,Originally posted by NinjaTrader_Cal View PostGussj,
This line -
using (Font outputFont = new Font("DefaultMonoSpace", 6f))
You just need to increase the 6f to say 12f.
Much appreciated, didn't know it was that simple.
and if I need to make it bold is it as simple as changing the size?
Thanks
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment