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

Long and Short position at the same time?

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

    Long and Short position at the same time?

    Is it possible to keep a long position open when an EnterShort is called? similarly when an EnterLong is called can I keep the short position?

    In addition, can I have multiple long/short positions?
    if so how do I close them individually?

    All of it is on the same chart/index.

    (I just need info on how to do it, not if its a bad idea)

    Any help is greatly appreciated

    #2
    Hello mrtheman11,

    Thanks for your post and welcome to the forums!

    No, the EnterLong() and EnterShort() will automatically close an opposite position.

    In the instrument you can have multiple strategy positions however, you would have to use the "unmanaged" approach where you would assume full responsibility for managing the trades. Please see: http://ninjatrader.com/support/helpG...d_approach.htm
    Please note that while you can have multiple positions, your account position will only be long, or short or flat, period.

    Also, please review these related links:

    http://ninjatrader.com/support/helpG..._account_p.htm

    http://ninjatrader.com/support/helpG..._positions.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello,
      Instead of using unmanged positions, is it posible to use two scripts attached to the same chart?, one doing all the long trades and the other doing all the short trades?

      Thanks

      Comment


        #4
        Hello Thinkfx,

        Thank you for your reply.

        Having multiple strategies running on the same instrument/account combination is highly discouraged. This is due to the fact that strategies are not aware of each other and running multiple strategies will usually cause issues with your account position.

        For example, if you have two strategies running and one is in a 4 long position; if the other takes a 4 short position, both strategies will show profits/losses, but your account position would effectively be flat and you'd not be in any position at all.

        We would recommend that if you are using multiple strategies on the same instrument that you run them using different accounts as that would be the only reliable way to keep the strategies in sync with the account position.

        You may find further information regarding this on the following forum thread:



        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          I understand the concept of hedging (going long and short on the same account) for which NT does not allow.

          HOWEVER -
          I'd like to inquire about two (or more) strategies only trading in the same direction on the same instrument on the same account:

          Imagine something simple ....
          One account, One Instrument, Two Long-Only Strategies:
          • Strategy A goes Long using a MACD signal on Silver Futures
          • Strategy B goes Long using a RSI signal on Silver Futures.
          Can NT handle this scenario?

          Specifically, in the SYNC column of the Control Center's Strategy Tab, SYNC changes from TRUE --> FALSE when two different strategies trade LONG on the same instrument.
          • On Bar #1 of the chart, Strategy A goes Long
          • A few bars later (Bar #5), Strategy B goes Long
          • It is at that point that SYNC goes from TRUE --> FALSE. (e.g. Strategy position does not match Account position)
          I have two questions....

          If SYNC is FALSE:
          1. Will strategies that are idle continue to enter LONG, as defined by their signals?
          2. Will strategies that are in position (Long), continue to work towards their defined Profit Target or Stop Loss?

          I guess the follow up will be, how might I setup my Long-Only Strategies to allow for both questions to be TRUE?
          • If I want both those statements to be true, is there any change I need to make to the strategies 'Start Behavior' property? I imagine 'Wait until Idle' would not allow both strategies to work indendantly on the same account. So, would I use 'Immediately Submit' or 'Immediately Submit & Synchronize Account' ?

          Seeking clarity here on the whole concept above. Thank you!

          -- WEX

          Comment


            #6
            Hello wildwex,

            Thank you for your reply.

            In this case, we would highly recommend combining both strategies into a single strategy that submits different long orders when the MACD or RSI signal is triggered so the single strategy may manage the entire position.

            You would not be able to sync both strategies at all times, as one taking an order will throw the other out of sync. Being out of sync with the account would not cause either strategy to disable or otherwise stop submitting orders. However, it should be noted that stop and target orders set by one strategy may be filled by the other strategy.

            I would actually suggest using Wait Until Flat if you decide to move forward with running two separate strategies, as this will not cause a synchronization order to be placed, throwing off the other strategy, and will instead wait until the strategy calculates a flat position and then start placing orders.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            23 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            45 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            22 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            181 views
            0 likes
            Last Post jeronymite  
            Working...
            X