• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 guvenators, Today, 05:18 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by LANwarr1or, Today, 03:00 PM
    2 responses
    8 views
    0 likes
    Last Post LANwarr1or  
    Started by Newtrader101, Today, 02:53 PM
    2 responses
    7 views
    0 likes
    Last Post Newtrader101  
    Started by JuanPabloQuevedo, Today, 02:53 PM
    2 responses
    9 views
    0 likes
    Last Post JuanPabloQuevedo  
    Started by samir, Today, 03:16 PM
    2 responses
    14 views
    0 likes
    Last Post samir
    by samir
     
    Working...
    X