Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OSO order signals from TradeStation to NT?

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

    OSO order signals from TradeStation to NT?

    I am looking for a simple strategy code which I could be used for placing trading OSO orders signals from Tradestation Automated Trading System into NinjaTrader through DLL.

    By using

    Success = NTCommand("PLACE", "Sim101","Buy" , 1, "Limit", Close - 0.25, 0, "Day", "", "MyOrderId","","");

    in TS Easy Language I have succeeded to place limit orders.

    By using

    Success = NTCommand("PLACE", "Sim101","Sell" , 1, "Limit", Close + 0.50, 0, "Day", "Oco1", "MyOrderId","","");
    Success = NTCommand("PLACE","Sim101","Sell" , 1, "Stop", 0,Close - 0.50, "Day", "Oco1", "MyOrderId","","");

    in TS Easy Language I have succeeded to place OCO orders after the entry limit order was filled.


    I think that for placing OSO orders I should use this:

    Success = NTCommand("PLACE", "Sim101","Buy" , 1, "Limit", Close - 0.25, 0, "Day", "", "MyOrderId","StrategyName","OSO1");
    Success = NTCommand("PLACE", "Sim101","Sell" , 1, "Limit", Close + 0.50, 0, "Day", "Oco1", "MyOrderIdPT1","StrategyName","OSO1");
    Success = NTCommand("PLACE","Sim101","Sell" , 1, "Stop", 0,Close - 0.50, "Day", "Oco1", "MyOrderIdSL1","StrategyName","OSO1");

    where StrategyName should be a name of strategy listed in the list of strategies.

    Does anybody have a code and name of such a strategy to pass it to me?

    DEbo9

    #2
    Hello DEbo9,

    Thank you for your post.

    We do not have any examples of OSO orders in a TS Strategy for the NTCommand() in our documentation. For the 'StrategyName', that is the name of the ATM Strategy in NinjaTrader that would be used with the order and not the name of the TS Strategy.

    You can find more information on the DLL interface for TS and NinjaTrader at the following link: http://ninjatrader.com/support/helpG..._interface.htm

    Please let me know if you have any questions.

    Comment


      #3
      Hello Patrick H.

      thanks for your prommpt reply. To make it more clear I am looking for a proper use or format of NTCommand(s) for placing OSO (or bracket) orders into Ninja from TradeSTation.

      As I mentioned I already found out how to place simple market and limit orders and OCO orders into Ninja from TS.

      But up till now I did not succeed with the the OSO (bracket) case.

      My first question is wheather I need to use the triple NT Command mentioned in my previous post, or something like

      Success = NTCommand("PLACE", "Sim101","Buy" , 1, "Limit", Close - 0.25, 0, "Day", "", "MyOrderId","SampleATMStrategy","atmStrategyId ");

      would be enough. SampleATMStrategy exists and is listed among Strategies in Ninja.It should place StopLimit 3Ticks unde the last Low if entry order is filled. But the NTCommand used in this format is not placing even the entry order.

      Could you recommend me how to change the NTCommand or its format to get it work?


      Thanks
      DEbo9

      Comment


        #4
        Hello Patrick H.

        the problem is solved. It works in this way

        Success = NTCommand("PLACE", "Sim101","Buy" , 1, "Limit", Close - 0.25, 0, "Day", "", "MyOrderId","ATMStrategyTemplateName","atmStrategy Id ");


        The crucial point is that ATMStrategyTemplateName is a name of Tempate (ATMStrategyTemplate) and not a name of Strategy (ATMStrategy)

        Thanks for help.


        DEbo9

        Comment


          #5
          DEbo9,

          I am testing my indicator of TS these days. I send orders from TS to NT for simulation. I have the problem as you did. Do you mean that I need creating both a template and amtStrategy?

          I am a newbie to NT, and do not find much information from help file.

          It would be really appreciated if you could explain it in detail.

          Thank you very much.

          ccl3093

          Comment


            #6
            Hello ccl3093,

            Thank you for your post.

            You would need to call the ATM Strategy Template name, as in the full name of the template you are using.
            For information on ATM Strategy Templates please visit the following link: http://ninjatrader.com/support/helpG..._templates.htm

            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by WHICKED, Today, 12:45 PM
            2 responses
            16 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by GussJ, 03-04-2020, 03:11 PM
            15 responses
            3,272 views
            0 likes
            Last Post xiinteractive  
            Started by Tim-c, Today, 02:10 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Taddypole, Today, 02:47 PM
            0 responses
            2 views
            0 likes
            Last Post Taddypole  
            Started by chbruno, 04-24-2024, 04:10 PM
            4 responses
            51 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Working...
            X