• 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 jleira, Today, 10:26 PM
        0 responses
        4 views
        0 likes
        Last Post jleira
        by jleira
         
        Started by wuileng, Today, 10:14 PM
        0 responses
        6 views
        0 likes
        Last Post wuileng
        by wuileng
         
        Started by mntemel, Today, 09:07 PM
        1 response
        10 views
        0 likes
        Last Post MojoJojo  
        Started by martyn73, Today, 08:22 PM
        0 responses
        10 views
        0 likes
        Last Post martyn73  
        Started by RobertoPaez, Today, 08:13 PM
        0 responses
        5 views
        0 likes
        Last Post RobertoPaez  
        Working...
        X