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

Processing Time for Ninjascript

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

    Processing Time for Ninjascript

    Which takes more processing Time

    Alerts with Sound and Message

    or the Equivalent
    using Print and Playsound

    If someone has a Good answer I would appreciate it as I am fighting to reduce processing time.

    thanks

    Jerry

    #2
    Hello,

    Thank you for the question.

    Both statements would take some processing but I am unsure of which would be more time. Are you running into performance problems while running a script? If so likely alerts are not the cause as these are very minimal.

    If you are having performance problems, please post a sample of the item in question as it may not directly be related to the alert but potentially something else.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for the question.

      Both statements would take some processing but I am unsure of which would be more time. Are you running into performance problems while running a script? If so likely alerts are not the cause as these are very minimal.

      If you are having performance problems, please post a sample of the item in question as it may not directly be related to the alert but potentially something else.

      I look forward to being of further assistance.

      Very Minimal ??
      Why does your own documentation warn about this.

      NOTE: High frequency of Print() method calls can represent a performance hit on your PC. Please see the NinjaScript section of the Performance Tips article for more information.

      Can you get me a better answer. Which takes more processing time Alerts or (Prints and Playsound)

      thanks
      Jerry

      Comment


        #4
        Hello,

        Thank you for the reply.

        Yes it is noted that high frequency use of Prints can have an impact on performance, In the prior message I had noted that the Alerts specifically were likely not the cause as they are very minimal, this left the statement open to either being the Prints or not. There was not a sample provided with the question so I can only provide a general statement. The syntax and logic you use will control how the script runs, so without a context of what you are doing this would be the most details I could provide.

        In either case using most any method call at a high frequency will of course increase the amount of work needed. I would not be sure of a way to test which is faster but again I will ask, are you seeing a performance problem while doing a specific task?

        If you are seeing a performance impact by doing some action, can you provide a sample of what you are doing so I could see if that would be expected or not? Without a example of what you are doing I could not provide a specific answer but only general statements.



        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Jesse
          I am asking about NinjaScript, NOT my code which can be written - rewritten and optimized.
          Focus on NinjaScript. Do alerts carry the same warning as Prints ? It doesn't specify this in your help files. So which is faster ? I don't want a performance hit. Its that simple. I will write my code in the most efficient way possible but I can't change NinjaScript so from the performance view I need to know which way to go without Writing both and then trying to analyze. Its a simple question about NinjaScript ( Not My Code ).

          Thanks
          Jerry

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by frslvr, Today, 09:38 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by guitarcombs, Today, 09:21 AM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Started by Kawasaki, 03-18-2021, 08:48 PM
          6 responses
          2,203 views
          0 likes
          Last Post aytacasan  
          Started by joostb, Today, 04:40 AM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by timmbbo, Today, 08:51 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X