• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to disable close position when another position is entered?

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

    How to disable close position when another position is entered?

    I am trying to figure out how to fix this. My strategy goes long if trend is up and goes short when down. Each time there's a reverse on one position it gets closed out when another position is entered. How do I disable this?

    #2
    relogical,

    It is not possible to be long and short at the same time unfortunately. The managed approach also would close a position and enter an opposite position for example if you previously did an EnterLong() then an EnterShort().

    If you enter 1 long contract, then 1 short contract, you are flat. I used to trade forex and we could "Hedge" however US regulations changed that. I am not sure how it works on all other instruments currently, however I would ask your broker if they even allow it.

    That being said, in NinjaTrader it's currently not possible to be long and short without using two separate strategies.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      What if I run two strategies one only goes long and one only goes short?

      Comment


        #4
        relogical,

        You could do this, however it would be sort of a synthetic hedge. Your account position would report as "Flat" but your strategies each would believe they are long or short and manage the orders that way. If you open 2 accounts, then you can be long and short at the same time.
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by tonynt, Today, 01:42 AM
        0 responses
        6 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by NT-Roland, Yesterday, 04:36 PM
        0 responses
        3 views
        0 likes
        Last Post NT-Roland  
        Started by Newtrader101, Yesterday, 03:40 PM
        2 responses
        11 views
        0 likes
        Last Post Newtrader101  
        Started by Branpo, Yesterday, 02:58 PM
        2 responses
        12 views
        0 likes
        Last Post Branpo
        by Branpo
         
        Started by sdauteuil, Yesterday, 02:09 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X