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 PaulMohn, Today, 12:36 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post PaulMohn  
                    Started by love2code2trade, 04-17-2024, 01:45 PM
                    4 responses
                    38 views
                    0 likes
                    Last Post love2code2trade  
                    Started by alifarahani, Today, 09:40 AM
                    2 responses
                    14 views
                    0 likes
                    Last Post alifarahani  
                    Started by junkone, Today, 11:37 AM
                    3 responses
                    20 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by frankthearm, Yesterday, 09:08 AM
                    12 responses
                    44 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Working...
                    X