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 WHICKED, Today, 02:02 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by selu72, Today, 02:01 PM
    0 responses
    1 view
    0 likes
    Last Post selu72
    by selu72
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Started by Mikey_, 03-23-2024, 05:59 PM
    3 responses
    49 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by Russ Moreland, Today, 12:54 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X