Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
horizontal line for current price
Collapse
X
-
horizontal line for current price
Is there an existing code out there for a simple horizontal line painted on the current price? If so, can someone point the way for me? ThanksTags: None
-
Thanks... that is exactly what I needed. Now for another question.... Is there a way to paint a histogram at the bottom of the chart? I would like to paint a small bar during the times that I trade (say from 5am to 4pm. I would like a little bar at the bottom to easily identify when I'm looking at historical charts. Is there something out there that does this or perhaps some easy code? Thanks
Comment
-
SinatraFan,
Sure, this is possible. You could create an indicator with a time filter. In your OnBarUpdate, something like this would work.
Essentially, this will assign a 1 to the plot if its during your trading hours, and a 0 if not.Code:if( ToTime(Time[0]) > ToTime(5,0,0) && ToTime(Time[0]) < ToTime(16,0,0) ) { Plot0.Set(1); } else { Plot0.Set(0); }Adam P.NinjaTrader Customer Service
Comment
-
Could you elaborate a bit more... I've never coded anything in NT... only tradestation and it's a bit foreign to me. How would I put that into an indicator?
Comment
-
Why not just change the background color?Originally posted by SinatraFan View PostThanks... that is exactly what I needed. Now for another question.... Is there a way to paint a histogram at the bottom of the chart? I would like to paint a small bar during the times that I trade (say from 5am to 4pm. I would like a little bar at the bottom to easily identify when I'm looking at historical charts. Is there something out there that does this or perhaps some easy code? Thanks
Comment
-
How do you do that??? I'm really green at NT... very well versed at easylanguage... but know nothing about c#
Comment
-
Follow the link to Turorials that Bertrand gave you. You will see that the Level 6 one does what we are discussing. If you are new to NInjaScript, you might want to start from Turotial 1. AS you already know how to code in another language, your learning curve will not be too steep.Originally posted by SinatraFan View PostHow do you do that??? I'm really green at NT... very well versed at easylanguage... but know nothing about c#
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
577 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 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
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment