Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Refresh indicator via script?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    Attached Files

    #2
    Originally posted by MiCe1999 View Post
    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:
    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


      #3
      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.
      Thanks! I ended up drawing the vwap via drawing tools and I'm happy with that for now.

      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 Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X