Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Removed from Chart vs Disabled

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

    Strategy Removed from Chart vs Disabled

    Could you please elaborate what is the difference between when a strategy is removed from a chart and when it is just disabled.

    I am getting an
    Unhandled exception: Object reference not set to an instance of an object.
    error in an unmanged strategy when I disable it from the chart but I do not get that error when I just remove it from the chart. For some reason, when debugging with Visual Studio, VS does not pick up on the exception.

    #2
    Hello cutzpr,

    Thank you for the post.

    There is nothing specific between the two ways to remove a strategy that I could note in contrast to the information you have provided so far.

    Object reference not set to an instance of an object indicates a null object.

    If this is happening when removing the strategy this may be in the strategies OnStateChange or possibly in the Terminated/SetDefaults/Configure states.

    Are you seeing this when you open the strategies menu and then disable the strategy or what is the process you followed to disable the script? Was this done in the control center?

    For this item, you would likely need to find what syntax is being used that causes this to occur. Have you at this point tried commenting out your logic just to locate the general area of the problem? Visual Studio may or may not be helpful in this case, commenting out your code will be helpful as the error will stop when the offending syntax is gone. This could help isolate a specific part of the script which will likely make it more apparent why that is happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by arvidvanstaey, Today, 02:19 PM
    3 responses
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by jordanq2, Today, 03:10 PM
    2 responses
    7 views
    0 likes
    Last Post jordanq2  
    Started by traderqz, Today, 12:06 AM
    10 responses
    18 views
    0 likes
    Last Post traderqz  
    Started by algospoke, 04-17-2024, 06:40 PM
    5 responses
    47 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by mmckinnm, Today, 01:34 PM
    3 responses
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X