Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Refresh indicator via script?
Collapse
X
-
Refresh indicator via script?
I modified MIDAS indicator (that plots VWAP) to have anchor set with a mouse click. It seems that anchor is correctly selected but nothing is drawn. I think I need to trigger the redraw somehow after anchor is set. Or, is there something else I'm missing:
Tags: None
-
You really only have two options, neither of which the NT development team will support as it's outside the scope.Originally posted by MiCe1999 View PostI modified MIDAS indicator (that plots VWAP) to have anchor set with a mouse click. It seems that anchor is correctly selected but nothing is drawn. I think I need to trigger the redraw somehow after anchor is set. Or, is there something else I'm missing:
1) you can call InvalidateControl. There's lots of pros and cons to this, but i'll leave that to you and google
2) You can call the chart control for "Refresh Ninjascript" through simulated right click and then finding the refresh button. Also a PITA. Also lots of cons.
Long story short you can do it, but it's not fun and leads to lots of potential errors. But it can and has been done before.
- Likes 1
-
Thanks! I ended up drawing the vwap via drawing tools and I'm happy with that for now.Originally posted by esanders251206 View Post
You really only have two options, neither of which the NT development team will support as it's outside the scope.
1) you can call InvalidateControl. There's lots of pros and cons to this, but i'll leave that to you and google
2) You can call the chart control for "Refresh Ninjascript" through simulated right click and then finding the refresh button. Also a PITA. Also lots of cons.
Long story short you can do it, but it's not fun and leads to lots of potential errors. But it can and has been done before.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 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
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment