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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X