Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Oif

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

    Oif

    having problems with

    CLOSEPOSITION;<ACCOUNT>;<INSTRUMENT>;;;;;;;;;;

    ...i.e. how can I pick up, via code, the account name and instrument name in the correct syntax to feed this command without any user input

    thanks.

    #2
    should have mentioned that using OIF builder I have

    CLOSEPOSITION;SIM101;6E 12-10;;;;;;;;;;

    this is fine on a one off basis....I want my code to pickup each users account and instrument automatically

    Comment


      #3
      ATI user, I'm not sure I follow you - which code are you talking about? NinjaScript? External App using OIF?

      Thanks
      BertrandNinjaTrader Customer Service

      Comment


        #4
        NT7
        Tools/Options/ATI tab OIF Builder

        I need the code in NT to pickup the account name and instrument name in the syntax acceptable to OIF

        Comment


          #5
          Though not supported officially, you could work with Account.Name in NinjaScript, instrument name can be 'grabbed' from the Instrument class - http://www.ninjatrader.com/support/h...instrument.htm
          BertrandNinjaTrader Customer Service

          Comment


            #6
            I tried that before I posted. It just returns '6E' without the contract date....which is not sufficient for OIF

            Comment


              #7
              You need to use the .FullName property not the .MasterInstrument.Name one.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                perfect Josh...thanks

                I overlooked that one

                Is there any way to pick up the account name?

                Comment


                  #9
                  You can try Account.Name ATI user.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    works fine ...thanks

                    Comment


                      #11
                      Originally posted by NinjaTrader_Bertrand View Post
                      Though not supported officially, you could work with Account.Name in NinjaScript, instrument name can be 'grabbed' from the Instrument class - http://www.ninjatrader.com/support/h...instrument.htm
                      how would you grab it?

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by fx.practic, 10-15-2013, 12:53 AM
                      5 responses
                      5,404 views
                      0 likes
                      Last Post Bidder
                      by Bidder
                       
                      Started by Shai Samuel, 07-02-2022, 02:46 PM
                      4 responses
                      95 views
                      0 likes
                      Last Post Bidder
                      by Bidder
                       
                      Started by DJ888, Yesterday, 10:57 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by MacDad, 02-25-2024, 11:48 PM
                      7 responses
                      159 views
                      0 likes
                      Last Post loganjarosz123  
                      Started by Belfortbucks, Yesterday, 09:29 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post Belfortbucks  
                      Working...
                      X