Draw.VerticalLine(this, "tag1", 64500, Brushes.Green)
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to enter vertical line in chart output for Strategy Analyzer
Collapse
X
-
How to enter vertical line in chart output for Strategy Analyzer
I'm trying to add a vertical line everyday that is being analyzed at a specific time. I've yet to make anything display and assuming I'm handling the time input incorrectly?
Code:Tags: None
-
Hello Dragon989,
Thank you for your note.
The following would draw a vertical line on the most recent current bar, 0.
Draw.VerticalLine(this, "tag1",0, Brushes.Green);
When you're passing 64500 its drawing a line 645000 bars Ago.
If you wanted a line drawn at a specific time each day, say 9AM, you could use the following,
if (Times[0][0].TimeOfDay == new TimeSpan(08,00, 0))
Draw.VerticalLine(this, "tag1"+CurrentBar, 0, Brushes.Green);
Notice I amend "Tag1" with the current bar, so the same line is not redrawn on each call but a new line is created.
See draw.vertical line section of our HG:
https://ninjatrader.com/support/help..._reference.htm
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by NW Trader, Today, 03:42 PM
|
1 response
3 views
0 likes
|
Last Post
|
||
Started by ralett, Today, 01:42 PM
|
1 response
3 views
0 likes
|
Last Post
|
||
Started by Barry Milan, Today, 01:33 PM
|
1 response
5 views
0 likes
|
Last Post
|
||
Started by dkbyond, Yesterday, 04:11 PM
|
1 response
20 views
0 likes
|
Last Post
|
||
Started by w0lverine, Yesterday, 08:22 PM
|
1 response
8 views
0 likes
|
Last Post
|
Comment