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

TradeStation

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

    #31
    ChrisL ask me on Friday to send an email to him with my setup for email orders so he could help with my email set up and I still have not heard back from him, Why does the email setup not work? I was assured it did. now today your changing it up I don't care I just need this to work and work well, email a dll or text file I just need it to get it to work, and the sooner the better. I've been messing with this now for two weeks and it should not be that complicated.

    Comment


      #32
      Originally posted by RMin101 View Post
      Trader guy - I have no clue what you're talking about can you please explain what is OIF file? Tradestation has apps to execute orders through the trader station that places orders in Ninjatrader but it does not work and it crases TradeStation and it's not what I am looking for. I want to be able to place strategy orders from TradeStation directly to NinjaTrader.

      Thank You

      Ray
      bltdavid has pointed you in the right direction. You can set up a set of functions to send the OIF files, much like NT delivered with NT 7 for the NTDIrectt DLL access. I set up a few for my testing needs that I have used from another EasyLanguage platform. They would look something like this:

      Code:
      *** Example Function ***
      
      //Submit an market entry order.  Returns OrderId
      
      Inputs:
          iPath(StringSimple),
      
      
          iFileName(StringSimple),
          iAccount(StringSimple),
          iSymbol(StringSimple),
          iQuantity(StringSimple);
      
      Variables:
          vOrderID(""),
          vCommand(""),
          vPathName("");
      
      
      vOrderID = emsBuildOrderId(iSymbol);
      vCommand = "PLACE;"+iAccount+";"+iSymbol+";BUY;"+iQuantity+";MARKET;0;0;DAY;;"+vOrderID+";;";
      vPathName = text(iPath,iFileName);
      
      Print(File(vPathName),vCommand);
      FileClose(vPathName);
      
      emsBuyMar****IF = vOrderID;
      ​
      Or, if you want to code them each time, something like this:

      Code:
      *** Example PLace Market Order ***
      
      "PLACE;SIM101;QQQ;BUY;10;MARKET;0;0;DAY;;;;"
      
      The text would need to be written to the correct NT folder to be picked up and executed.
      These are examples only. You will need to code up what you need and test them in a SIM account. I don't know what the email interface produces; I've not used it.

      TraderGuy
      NinjaTrader Ecosystem Vendor - EMS

      Comment


        #33
        Originally posted by RMin101 View Post
        Got it that screenshot helped so is this how the email sending offer works by creating a text file for the order? Can you give me what the TradeStation code would look like to send the order? I'm asking because it looks like these commands are used for closing orders not opening or modifying them.

        SellShort ( "Sell" ) NumberOfContracts Contracts this bar on close;

        SetStopLoss(StopLoss*NumberOfContracts);​
        Don't know anything about the email interface, never used it.

        Where do you see 'SellShort' and 'SetStopLoss'?
        I don't see those functions listed for the DLL interface.

        For the DLL interface, look for the 'Command' method.

        'Command' looks like an interface to the OIF, but I suspect
        OIF and 'Command' are interfaces into the same underlying
        ATI engine.

        Use 'Command' to open orders, close, and modify them.
        For ex, use 'PLACE' to submit orders.

        It seems pretty clear in the docs ...

        Comment


          #34
          Hi should I have a new text file for each open and close?

          Comment


            #35
            Originally posted by NinjaTrader_ChrisL View Post
            Hi, the NTDirect.dll is not longer supported in NinjaTrader 8. The TradeStation DLL interface can only be used in NinjaTrader 7.
            What you said is not correct. The dll works fine with release 8.0.26.0, and the help guide provides directions on how to use it. If it's not supported, then why is it in the user guide?

            Comment


              #36
              Originally posted by RMin101 View Post
              Hi should I have a new text file for each open and close?
              The docs say,

              "You may stack the instruction lines so that each file
              contains as many instruction lines as you desire."

              So, uh, I can't imagine you would open and close the same trade by
              stacking the two commands into the same file, so, sure, yeah, you
              need two files -- but, that's your call.

              I would definitely recommend numbering each OIF file sequentially,
              per the example mentioned in the help guide.

              Just my 2˘.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              5 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,266 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              13 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X