Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy one contract, sell another at (approximately) the same time

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

    Buy one contract, sell another at (approximately) the same time

    First let me apologize if I don't quite have the jargon down, I come from a software development background, not a trading one.

    Currently I'm using the SIM version of NinjaTrader. I've written an app that successfully communicates with NT via NTDirect.dll.

    1) Here's the crux of what I'm trying to do: buy long one ES contract and sell short another ES contract at the same time. It seems to me that if I were to use the COMMAND function to place a "BUY" order, then use the same function to place a "SELL" order, that the two would basically just represent the in and out roundtrip of a single position.

    2) Now, at the risk of posting two somewhat separate questions in the same thread: I'd like for each contract position to have a "target", and when that target is met the position should be exited at market price automatically. Is there an easy way to exit a position when a target is met (using NTDirect.dll)?

    Cheers,
    bspires

    #2
    bspires, there are two ways you can place a target order with the ATI.

    First of all, targets are simply limit orders placed some price away from the current price. Lets say you bought an ES contract at 1200. You can then place a limit order to sell at 1205 which would represent your profit target. For a stop loss, you'd have to use a stop order.

    The other option would be to create an ATM strategy in NinjaTrader that will automatically manage your trade for you (stops, targets, moving stops/targets, etc), and then when you use the COMMAND function, reference that ATM (as the strategy parameter) and it will take over your trade for you.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thank you very much for the information.

      That helps me understand setting up target prices. However, I'm still confused about how to simultaneously hold one long and one short contract in a single future's instrument.

      To give a better idea of what I'm trying to do: let's say I've identified a trend (e.g. the NQ is currently trending lower since today's open.) What I'd like to do is sell one contract short (because I think NQ is going to continue to trend even lower within my trading window), but at the same time I'd like to buy a contract long because I think NQ will ALSO retrace within my trading window.

      This seems like a rather straightforward idea to me, but I can't figure out how to accomplish it in Ninjatrader. Again, I'm using NTDirect.dll for automation, but any help -- including manually accomplishing what I've described -- is appreciated.

      Comment


        #4
        bspires, I'm not sure I follow you - with this approach you would then be net flat (-1 + 1 = 0) and not having any position open at all - if you route all to the same account.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,

          Thank you for the response. Again, I come from a software background, not a trading background, so I apologize for some naivete.

          Your point is well taken (-1 + 1 = 0), and perhaps I may require two accounts. Please let me explain a little further the "strategy" I'm thinking of. Let's say the NQ is at 1000, and based on the analysis of recent trading activity, there is an indication that within the next 60 minutes it is likely to reach 1001 AND likely to reach 999. I don't know when it's going to reach those two price points, and I don't know which it will reach first, but I "know" (if I believe my analysis) that it will reach both of those targets at some point within the next hour.

          So my goal is to profit from both a bullish position (buy at 1000, exit at 1001) and a bearish position (short sell at 1000, exit at 999). In fact, for the overall strategy to work, I need to be able to take these two separate positions -- 1) because they act as a hedge on each other in instances when the market bucks the expectations of the analaysis, 2) because they both, in the long run, contribute to the overall profitability of the strategy.

          So, is it possible to run a strategy like the one I've outlined with only one account, or would I need two?

          Comment


            #6
            Thanks for clarifying - you would need to work each side of the strategy on an individual account then, otherwise you would just be flat if both working on one account.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thank you very much. That's the information I needed.

              Cheers

              Comment

              Latest Posts

              Collapse

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