Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading System Order Entry Issue

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

    Trading System Order Entry Issue

    My system uses stops to enter and exit the market.

    It is a momentum based system and depending on which direction the market goes, I need to have the ability to place both an Entry Stop to Buy, and an Entry Stop to Sell in any given market.

    I need my system to be fully automated. Is there a way to do this other than having it print my orders for the following day, exporting them to a spreadsheet and then submitting them?

    Please advice. Thanks!

    #2
    kingerie,

    I presume you are trying to trade a breakout? If not, please feel free to correct me.

    We have a reference sample for this : http://www.ninjatrader.com/support/f...ead.php?t=3223

    I would suggest watching our Automated Strategy Development Level I webinar.

    Here is our schedule : http://www.ninjatrader.com/webinars

    Here is a recorded version : http://www.youtube.com/watch?v=fVFqw5W8uGI

    If you have limited time or programming abilities, I would suggest using a NinjaScript consultant.



    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      That is correct. I am trying to trade a breakout. I have a programmer that I'm already working with and have worked with for over 10 years. We are just new to ninjatrader.

      I am working with him again tomorrow and I'll show him the reference sample above. Thanks!

      Comment


        #4
        kingerie,

        Thanks for your note.

        Since you are working with a programmer, we have many more reference samples at the following link.



        Our help guide also has our programming API.



        NinjaTrader uses NinjaScript, which is based on C#. Any books on C# would help to learn the language.

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          The problem is that I don't seem to be able to add *both* of these at the same time:

          this.EnterLongStop(0, false, 1, stopPriceLE, "LE");
          this.EnterShortStop(0, false, 1, stopPriceSE, "SE");

          We are trying to write a system that will handle a breakout in either direction and will subsequently set up the appropriate exits based on Position.MarketPosition and wether it's Long or Short.

          If I do either of the above statements it works... but if I do them both (so that there are effectively two orders in the market)... then I get the error: "An Enter() method to submit an entry order... has been ignored".

          We are working with Daily data so we are basically entering these orders overnight.

          A nice addition would be an OCO on these two entry orders... not sure if that is possible either.

          - Brian (the programmer)

          Comment


            #6
            Brian,

            Its possible to submit multiple orders for a breakout strategy with OCO, but the unmanaged approach would need to be used here.

            The managed approach, which you are currently using, has some order management rules used to help eliminated unwanted positions, etc.



            Our breakout sample I provided should help here, however alternatively you can use the unmanaged approach.



            If you look here : http://www.ninjatrader.com/support/h...ubmitorder.htm

            This has a OCO id field you can use.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Ok... but just to confirm... what are the rules regarding *managed* entry orders:

              1) Can you have both long and short entries?
              2) If you can, can you tie these two entries together as OCO's.

              If I have to go to unmanaged orders... do I lose all the nice charting where lines are drawn between the entry and exits?

              Thanks!

              - Brian

              Note: The example you gave me a link to only handled breakouts in the long direction, not in both directions.
              Last edited by kingerie705; 03-26-2012, 02:05 PM. Reason: added Note

              Comment


                #8
                Brian,

                The unmanaged approach would be needed for OCO.

                Orders will still plot to the chart.

                The rules for the managed approach are :


                The following rules are true per unique signal name:


                Methods that generate orders to enter a position will be ignored if:
                • A position is open and an order submitted by an exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction
                • A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
                • The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
                • The entry signal name is not unique

                Methods that generate orders to exit a position will be ignored if:
                • A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
                • A position is open and an order submitted by a set method (SetStopLoss() for example) is active

                Set() methods that generate orders to exit a position will be ignored if:
                • A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
                • A position is open and an order submitted by an exit method (ExitLongLimit() for example) is active

                Please let me know if I may assist further.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                647 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                369 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                108 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                572 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                573 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X