I followed closely your instructions, and the end result is the same.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Vertical Line to cover full height of Chart window
Collapse
X
-
Hi Botan626,
Please try this version of the script attached. Import it and say "Yes" to replace the file you have installed currently. The script does use unsupported rendering code, so if this does not work it will need to be tested on a different PC.Attached FilesChris L.NinjaTrader Customer Service
Comment
-
No, 1920x1080 resolution, 125% scale, 15.6".
And, just out of curiosity, I changed scale to 100%, and it covers the full height of all panels now!
Reversing back to 125% makes the line to be limited length again.
100% scale is impossible to work with on Win10, 125% was default, so I really hope you can fix it in the script.
Comment
-
Hello Botan626 and others in this thread,
I think we should be clear that the script I released here uses unsupported code to "trick" NinjaTrader into drawing beyond the ChartPanel the drawing tool was placed. NinjaTrader has internal code that clips rendering to the ChartPanel that is owned by the object. This script breaks out of that clipping rectangle in a "hacky" way in that it attempts to replace the clipping rect with its own. As it is unsupported code, the best I can say is: "if it works for you, great!"
If this script is not working on your end, there is not really anything else I can do because of the approach that is taken in the script. We do have a feature request tracking interest to have this officially supported, and we will add a vote on your behalf. The feature request ticket ID is SFT-654.
We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA or promise of fulfillment. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.
Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
If you have any additional inquiries, please do not hesitate to open a new thread.JimNinjaTrader Customer Service
Comment
-
Sorry for the dumb question, but how do I call VerticalLineAllPanels from my indicator?
I have the code below in an if statement and would like to replace it with the vert line across all panels but can't figure out the input parameters
VerticalLine signalLine = Draw.VerticalLine(this, "BBSqz" + CurrentBar , 0, Brushes.White);
signalLine.Stroke = new Stroke(Brushes.White, DashStyleHelper.Dot, 2);
Comment
-
Hi cre8able, thanks for your post.
The script is not supported for NinjaScript access. It needs public constructors added like the other drawing tools have to be called externally. E.g. from the line script:
Code:/// <summary> /// Draws a vertical line. /// </summary> /// <param name="owner">The hosting NinjaScript objec t which is calling the draw method</param> /// <param name="tag">A user defined unique id used t o reference the draw object</param> /// <param name="time"> The time the object will be d rawn at.</param> /// <param name="brush">The brush used to color draw object</param> /// <returns></returns> public static VerticalLine VerticalLine(NinjaScriptBase owner, string tag, DateTime time, Brush brush) { return VerticalLineCore(owner, false, tag, int.MinValue, time, brush, DashStyleHelper.So lid, 1); }
Chris L.NinjaTrader Customer Service
Comment
-
The reason the "Vertical Line All Panels" does not draw all the way down is simple - the NinjaTrader code does not take into account the scaling factor that is commonly applied to high-resolution displays. That is why if you change your scaling to 100% it works, and is also why for some monitors and scaling factors if you draw a "vertical line all panels" too far to the right in the chart it is invisible. The key fact is that ChartControl.ActualWidth and ChartControl.ActualHeight are unadjusted and need to be adjusted by the scaling factor. The attached revision addresses this, and works correctly for 4K and other high resolution monitors that routinely use a scaling factor of greater than 100%.Attached Files
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,265 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
11 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment