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

Print()-how to limit output lines printed...

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

    #16
    Art09,

    If you feel there is an issue with the platform, please isolate to as simple a script as possible, and provide the steps needed to see the issue. Send to [email protected] or attach to this thread.
    Ryan M.NinjaTrader Customer Service

    Comment


      #17
      Hi,
      I forwarded the simplest compiled Stoch indicator with CrossAbove/Below and Print(). The problem: getting multiple lines of output per cross/arrow. Expected to see single arrow - single line of output. Hope to hear from you soon. Please help.
      Regards, Art.

      Comment


        #18
        Art,

        Please find attached output for running your indicator. I added CurrentBar to the print statement so you can see it is only printing one time per bar.

        The code you have presented so far needs to be debugged and simplified. We unfortunately can't provide the debugging service you request, but have partners who offer this service.

        Attached Files
        Ryan M.NinjaTrader Customer Service

        Comment


          #19
          All I need is to know is how to get the correct values from the first line of output and disregard the rest as only the first line brings the correct vals for some of my variables... In your attachment I see the same problem - many, many, many... lines of output per cross with bar count. Can you please email ([email protected]) or attach my whole script with your fix or just the Print() line from the script. I do not know how to add CurrentBar to Print() correctly. I tried to add CurrentBar as follows ... Print(.... +CurrentBar) at the end - does not help at all.
          This is important issue to me and I intend to get level 2-3...10 support if needed and not bcs I have nothing better to do...
          Thank you.
          Regards, Art.
          Last edited by Art09; 11-16-2010, 11:01 AM.

          Comment


            #20
            Art, I'll ask Ryan to attach the script he created in his testing so you can check it out - if you currently do not have the skills to add the + CurrentBar for debug purposes I would suggest you take some time working through our coding tutorials showcased here -



            Those will cover the basics you need to get going in NinjaScript.

            Should you still have issues debugging you're code a NinjaScript consultant may be the best solution to get this professionally created for you, please see Ryan's link in the previous post for a list.

            Thanks
            BertrandNinjaTrader Customer Service

            Comment


              #21
              These are the print statements used to generate the output:

              Code:
               
              Print("Below hh = "+hh + " CurrentBar " + CurrentBar); //" --- Time:......"+Time[0]);
               
              Print("Above ll = "+ll + " CurrentBar " + CurrentBar); // " --- Time:......"+Time[0]);
              Ryan M.NinjaTrader Customer Service

              Comment


                #22
                Thank you very, very, very... much! It finally works.
                Regards, Art.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by geddyisodin, Today, 05:20 AM
                2 responses
                16 views
                0 likes
                Last Post geddyisodin  
                Started by hazylizard, Today, 08:38 AM
                0 responses
                6 views
                0 likes
                Last Post hazylizard  
                Started by Max238, Today, 01:28 AM
                5 responses
                42 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by giulyko00, Yesterday, 12:03 PM
                3 responses
                12 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by habeebft, Today, 07:27 AM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_ChristopherS  
                Working...
                X