Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to know how a chart object has been removed from user or by reloading script.

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

    How to know how a chart object has been removed from user or by reloading script.

    Is there a way to know from code ( from the OnTerminated method ) if a drawing object has been removed manually ( right click --> Remove ) or if it has been removed following reloading the script ( F5 or Reload NinjaScript ) ?

    Thank you very much !

    #2
    Hello blar58,

    Thank you for your inquiry.

    That's going to be a bit tricky.

    An example of tracking when an object is added to or removed from a chart may be found here:



    However, seeing if it has been removed from a reload would mean you would have to track what was present before the Reload NS operation and then afterwards. You could use static variables to track what was present before and after pressing F5, but we wouldn't have an example of that functionality.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    140 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X