Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddChartIndicator leaves phantom indicator when strategy disabled

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

    AddChartIndicator leaves phantom indicator when strategy disabled

    hi all

    In a strategy I am using AddChartIndicator.
    The indicator that is added uses OnRender to draw stuff on the chart.

    Sometimes (not always), when the strategy disabled, the Indicator is left on the chart as a phantom.
    How do I know this?

    1. The OnRender continues to work so I can see the graphics on the chart
    2. When I go to the Indicator list, these hidden indiactors are in the list (just without the name). I can select them with the mouse and remove them.
    3. Once I remove these phantom indicators from the indicator list, the rendedred objects also disappear from the chart

    I have a log of the machine where this is happening. There are a few rendering related errors in there but not sure its related.

    #2
    Hello onb1,

    Thanks for your post.

    I am testing a simple test strategy that adds an indicator that uses OnRender and I am not able to reproduce the symptoms. Could you let me know anything I specifically must do to reproduce this issue using my test script?

    We will want to use this script so we can rule out indicator rendering errors versus a platform issue. Below is a demo showing my test.

    https://drive.google.com/file/d/1ZNC...w?usp=drivesdk

    If you see issue/errors testing your script but not when testing the test script attached, I suggest looking further into your OnRender code in the indicator and the rendering errors that you are receiving.

    If you have specific questions about some SharpDX error that is received, please extract the specific OnRender code that is showing issue and implement it in a "dummy" script to so it demonstrates the issue in clear terms, and we will be happy to have a look and share our insight.

    We look forward to assisting.
    Attached Files

    Comment


      #3

      It's true, it happens to me as well as to you, try to do this in OnBarUpdate():
      Code:
      int x = -1;
      while (x = -1)
      {
      }
      and then close this page, the process stills in your process queue taking memory and CPU.

      Comment


        #4
        Hello mbcito,

        This is an infinite loop. An infinite loop will continue to process. Do not make infinite loops.

        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