Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Calling custom indicator from strategy (AddChartIndicator)

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

    Calling custom indicator from strategy (AddChartIndicator)

    I want to called the indicator from the strategy as it is related.

    I want to plot it, therefore I used AddChartIndicator(...).
    However, after I used this and go the chart there to continue to add the other indicator manually, then it give the error of

    unhandled exception object reference not set to an instance of an object

    Therefore, i am confused why would I getting this error.
    Attached Files

    #2
    Hello cincai,

    Thanks for your post.

    Just to check, you are saying that you add and enable the strategy to the chart and the strategy includes AddChartIndicator() with some indicator. At this point there is no error, is that correct? Does the indicator added with AddChartIndicator() display as expected?

    Sometime later you add some other indicator and at that point, the error is produced?

    As a test, can you add the indicator to the chart before placing the strategy, and do you still get the error?

    As a test, can you add and enable your strategy and then add some other/different indicator such as an SMA, do you get an error then?

    We need to isolate what is generating the error.

    What is the indicator being used in addChartIndicator()?

    What is the indicator being added separately?
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mattbsea, Today, 05:44 PM
    0 responses
    3 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    31 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    20 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Working...
    X