Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
dash line on chart for open orders
Collapse
X
-
dash line on chart for open orders
Is there a way to have a moving dashline on the chart window(if your orders are pegged to some indicator) according to where cover and stoploss orders are? Is there an example of this for a code? I am familar with the AddLine method in indicators, would I just use that in onbarupdate method?Tags: None
-
Hello Boonfly8,
Thanks for your post.
We do not have a documented property to check if an Order is attached to an indicator, but with some use of Intellisense/Intelliprompt, we can see an Order.IsTrackingEnabled property that could potentially be used to identify if the order is attached to an indicator. (This property is undocumented and its use may change as it is not locked into documentation. Please keep this in mind if functionality changes.)
I may suggest to monitor the strategy's orders in Order objects like seen in the SampleOnOrderUpdate strategy and then to check if the order is attached to an indicator. You will want to use Draw.Line() with your desired DashStyle in OnBarUpdate to draw the line.
Draw.Line() - https://ninjatrader.com/support/help.../draw_line.htm
SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm
Please let me know if I can be of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
49 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
67 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment