Announcement

Collapse
No announcement yet.

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?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X