Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator only visible on one instrument

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

    Indicator only visible on one instrument

    I created an indicator that drew on the price panel, during development I was using GC charts, but nothing about the indicator is specific to GC. When I shut down for the night everything was working fine. This morning when I started up NT8. The new indicator was not visible on GC. It loads but is not visible. However when I load it on CL it works fine. There are no error in the Output window. Again there is NO instrument specific code. Any help would be grateful.

    #2
    Hello Itachi,

    Is the indicator in the Indicators window in the configured list on the chart in question?

    Did the conditions to draw the object evaluate as true?

    What barsAgo values where used for the anchors?

    If the expected behavior is not occurring, this would indicate that the condition that triggers the action is not evaluating as true. This could result in an order not being submitted, a value not being assigned, a drawing object not being drawn, or many other actions.

    To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

    In the strategy add prints (outside of any conditions) that print the date time of the bar and all values compared in every condition that triggers the action.

    The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for this action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

    The debugging print output should clearly show what the condition is, what time the conditions are being compared, all values being compared, and how they are being compared.

    Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

    I am happy to assist you with analyzing the output from the output window.

    Run or backtest the script and when the output from the output window appears save this by right-clicking the output window and selecting Save As... -> give the output file a name and save -> then attach the output text file to your reply.

    Below is a link to a support article that demonstrates using informative prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.


    Let me know the date and time the behavior occurred or when you are expecting the behavior to occur.

    Please let me know if I may further assist with analyzing the output or if you need any assistance creating a print or enabling TraceOrders.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      The conditions are pretty simple

      Is the indicator in the Indicators window in the configured list on the chart in question? yes

      Did the conditions to draw the object evaluate as true? yes simple oscillator value below 20 or above 80

      What barsAgo values where used for the anchors? current bar in other words bars ago = 0;

      Im not doing any orders or anything like that.

      What gets me is why was it working on GC last night but not today and why does it some how work on CL . I can verify conditions being met.

      Comment


        #4
        Hello Itachi,

        Thank you for confirming the initial questions.

        May I have the output saved to a text file to assist with analyzing the issue?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Also I don't know if this is related, but I have built another indicator that is supposed to draw vertical lines in the price panel, however on one instrument it draws the lines on the price panel but on the other instrument it draws it in the indicator panel

          Comment


            #6
            Hello Itachi,

            This would depend on how the script is being added to the chart, (directly with a Panel specified or AddChartIndicator() and any adjustments made to the indicator object) as well as the DrawOnPricePanel property.
            Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


            If you print the <indicator>.DrawOnPricePanel from each script in State.DataLoaded, are these both false?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Was able to backtrack and fix the issue

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              557 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X