Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Indicator dissapears after clicking OK

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

    Indicator dissapears after clicking OK

    I have an indi, after adding into the list


    and clicking APPLY, it plots on chart, but after clicking OK (or CLOSE) button, everything (lines) hide, and in databox, every values aside labels are empty...
    what happens?
    this started to happen, after I tried to manually add 2 plot lines in existing ready-made indicator.

    (attached the script)

    if I comment he 673 & 674 lines:

    //PreSessionHigh2x.Set.....
    //PreSessionLow2x.Set....

    then problem goes away.
    Attached Files
    Last edited by ttodua; 04-30-2017, 09:00 AM.

    #2
    Hello selnomeria,

    I've tested your script but I am not able to reproduce the behavior.
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    Please send an email to platformsupport [at] ninjatrader [dot] com so that we may schedule a call during our normal support hours to test on your end.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by selnomeria View Post
      I have an indi, after adding into the list


      and clicking APPLY, it plots on chart, but after clicking OK (or CLOSE) button, everything (lines) hide, and in databox, every values aside labels are empty...
      what happens?
      this started to happen, after I tried to manually add 2 plot lines in existing ready-made indicator.

      (attached the script)

      if I comment he 673 & 674 lines:

      //PreSessionHigh2x.Set.....
      //PreSessionLow2x.Set....

      then problem goes away.
      How exactly did you declare and sync your extra Plots? Show all the lines that you added to the file in order to enable your extra plots. We cannot just Set a plot value without first setting up the Plot object properly.

      Comment


        #4
        thanks for excellent support.

        it's strange , why it gives me problems... maybe beacause I use imported 1 min-sample data for chart?

        here is the comparison of the initial file and modified file:



        error in log shows me:


        I find, that if i remove the customly overriden method "PLOT" from this indicator, then it seems to work for me (but without that method, the custmization is lost).

        Comment


          #5
          Hello selnomeria,

          As a heads up, overriding the Plot() method is not supported or documented for NinjaTrader 7 nor are custom TypeConverters. This means the unsupported code the NinjaTrader staff is not able to assist with.

          However, this type of indexing error just needs to be debugged and can arise anywhere in the script indexes are being called.

          I recommend you add prints to the script throughout the Plot override to find the exact line that is causing the indexing error.

          From a glance, there appear to be 14 plots (indexes 0 through 13) and anywhere there is a hard-coded reference these all appear to be valid. I would be suspicious of loops. Prints will be very helpful here to see what indexes are being accessed in the loop.

          Below is a simple demo of using prints to understand behavior.
          Dive into manipulating C# code from within an unlocked NinjaScript strategy using the NinjaScript Editor.NinjaTrader 7 is an award winning end to end online ...
          Last edited by NinjaTrader_ChelseaB; 05-02-2017, 07:04 AM.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            thanks for hint.
            I've started to debug and found out that the index of Brushes was not enough for Plots...
            thanks! solved!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by yertle, Yesterday, 08:38 AM
            7 responses
            28 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by bmartz, 03-12-2024, 06:12 AM
            2 responses
            21 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by funk10101, Today, 12:02 AM
            0 responses
            5 views
            0 likes
            Last Post funk10101  
            Started by gravdigaz6, Yesterday, 11:40 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by MarianApalaghiei, Yesterday, 10:49 PM
            3 responses
            11 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X