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
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ntbone, Today, 02:30 PM
        0 responses
        5 views
        0 likes
        Last Post ntbone
        by ntbone
         
        Started by tuliomgui, Yesterday, 10:07 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by Learner Trader, Today, 08:36 AM
        1 response
        24 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by GeorgeW, Today, 03:15 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by timko, Today, 11:55 AM
        4 responses
        12 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Working...
        X