• 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

Simultaneous Buy/Sell Order Strategy

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

    Simultaneous Buy/Sell Order Strategy

    Hi NT support,

    I was wondering if:

    1.
    within the managed approach it is possible to simultaneously enter long and short stop entries within the same bar session. e.i.

    Code:
     If( ATR(14)[0] < voltrigger && entryOrderLong == null && entryOrderShort == null)
    {
        entryOrderLong = EnterLongStop(0, false, DefaultQuantity, High[0], "Long")
        entryOrderLong = EnterShortStop(0, false, DefaultQuantity, Low[0], "Short")
    }
    2.
    if 1. is true, how do I need to set EntryHandling to make sure my strategy can take both (long and short) entries? would the code below make the trick:

    Code:
    protected override void Initialize() 
    { 
        EntriesPerDirection = 1; 
        EntryHandling = EntryHandling.AllEntries; 
    }

    #2
    Helllo sburtt,

    Using the Managed Approach you would only be able to place an order in 1 Direction. The other order would get ignored.

    If you would like to place an order going Long and Short you would have to use the Unmanaged Approach.

    http://www.ninjatrader.com/support/h...er_methods.htm
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by iceman2018, Today, 09:56 PM
    0 responses
    3 views
    0 likes
    Last Post iceman2018  
    Started by iceman2018, Today, 09:51 PM
    0 responses
    3 views
    0 likes
    Last Post iceman2018  
    Started by linacesaro, Today, 09:17 PM
    0 responses
    3 views
    0 likes
    Last Post linacesaro  
    Started by n8dogg59, Today, 06:55 AM
    2 responses
    17 views
    0 likes
    Last Post n8dogg59  
    Started by pstrusi, Today, 03:29 PM
    2 responses
    10 views
    0 likes
    Last Post pstrusi
    by pstrusi
     
    Working...
    X