Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SAVE To FILE

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

    SAVE To FILE

    How can I on onBarUpdate()

    Save to a simple text file.

    Does ninja give the ability to write out to streams? like in C++

    Help

    M

    #2
    Originally posted by marluv View Post
    How can I on onBarUpdate()

    Save to a simple text file.

    Does ninja give the ability to write out to streams? like in C++

    Help

    M
    There are sample files that demonstrate this. Here is a link to the streamwriter.

    Comment


      #3
      Thanks Tasker!

      Marluv,

      Tasker sample is a great starting point and the one I would recommended as well

      Let me know if we can be of further assistance
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Great Job Guys

        Great Job Guys,

        That was quick

        Comment


          #5
          C Sharp Libraries

          So basically I can pull any windows C# library from windows and put it in my ninja script code?

          Comment


            #6
            As long as it is .NET C#
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              How do I get the StreamWriter to spit out the whole line in one shot and not bit by bit as the way its doing now.... For example spit out 80 chars one shot vs, chunk1 chunk2 chunk3 up to finally 80 chars...

              Thanks!!
              Last edited by marluv; 02-18-2014, 10:23 AM.

              Comment


                #8
                Here is a great source of reference:

                Implements a TextWriter for writing characters to a stream in a particular encoding.

                Comment


                  #9
                  I think that worked again

                  Comment


                    #10
                    Man you guys are AWESOME on this board

                    Comment


                      #11
                      how to get instrument symbol?

                      how to get instrument symbol? From .net class?

                      Comment


                        #12
                        You can get that from the Instrument class we have in NinjaScript - http://www.ninjatrader.com/support/h...instrument.htm
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Gosh u guys are good, 3 for 3... every question was answered !!! DAMMIT this is heaven

                          Comment


                            #14
                            How do I get the Instrument name and Expire month in one.... For example "ESH4"?

                            Comment


                              #15
                              Originally posted by marluv View Post
                              How do I get the Instrument name and Expire month in one.... For example "ESH4"?
                              You should spend some quality time with the Ninjascript language reference. Here is the description of Instrument.FullName from the reference.

                              FullName

                              Definition:
                              Returns the full NinjaTrader name of an instrument. For futures, this would include the expiration date. The June S&P 500 Emini contract full name is "ES 09-09".

                              Property Value:
                              A string representing the full name of the instrument.

                              Syntax:
                              Instrument.FullName

                              Additional Access Information
                              This property can be accessed without a null reference check in the OnBarUpdate() event handler. When the OnBarUpdate() event is triggered, there will always be an Instrument object. Should you wish to access this property elsewhere, check for null reference first. e.g. if (Instrument != null)
                              Last edited by Tasker-182; 02-19-2014, 09:10 PM. Reason: PC

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cre8able, Today, 03:20 PM
                              1 response
                              9 views
                              0 likes
                              Last Post cre8able  
                              Started by fiddich, Today, 05:25 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post fiddich
                              by fiddich
                               
                              Started by gemify, 11-11-2022, 11:52 AM
                              6 responses
                              804 views
                              2 likes
                              Last Post ultls
                              by ultls
                               
                              Started by ScottWalsh, Today, 04:52 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by ScottWalsh, Today, 04:29 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post ScottWalsh  
                              Working...
                              X