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

Runing a file when new bar plots

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

    Runing a file when new bar plots

    Hi
    is it possible to write a code to run a file when a new bar is plotted?

    Thank you

    #2
    Originally posted by elgaza View Post
    Hi
    is it possible to write a code to run a file when a new bar is plotted?

    Thank you
    If you can do it in c#, then sure.

    Comment


      #3
      Yes, that would be then just standard C# to run your custom file.

      For example here's a sample implementing a read / write operation from a file using System.IO

      BertrandNinjaTrader Customer Service

      Comment


        #4
        would it be too much to ask to write a short code for me?
        I'm not a programmer
        thank you

        Comment


          #5
          We could unfortunately not really custom develop this for you - have you checked into the sample link? It would show you for example how to open a txt file and read from it. What are you trying to do and run exactly? What action do you look to automate?
          BertrandNinjaTrader Customer Service

          Comment


            #6
            I have an indicator that for some reason needs to be refreshed every time and I have a script that does just that that clicks F5 on that window, if I could do that from Ninja it would be better and for that window only if I so choose

            Comment


              #7
              elgaza, instead of running that file / external program it would be probably easier to include a SendKeys.Wait command from C# for triggering the F5 press via code directly.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                this is exactly what I mean, but I'm not too sure how to do this
                and thank you for replying back

                Comment


                  #9
                  elgaza, here's an example you could check into - http://www.ninjatrader.com/support/f...ad.php?t=37808

                  You would be then sending a F5 command instead but the structure would be the same.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    thank you for that I'll try it

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Mestor, 03-10-2023, 01:50 AM
                    16 responses
                    388 views
                    0 likes
                    Last Post z.franck  
                    Started by rtwave, 04-12-2024, 09:30 AM
                    4 responses
                    31 views
                    0 likes
                    Last Post rtwave
                    by rtwave
                     
                    Started by yertle, Yesterday, 08:38 AM
                    7 responses
                    29 views
                    0 likes
                    Last Post yertle
                    by yertle
                     
                    Started by bmartz, 03-12-2024, 06:12 AM
                    2 responses
                    22 views
                    0 likes
                    Last Post bmartz
                    by bmartz
                     
                    Started by funk10101, Today, 12:02 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post funk10101  
                    Working...
                    X