• 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

Enetering Multiple Orders with Single Condition

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

    Enetering Multiple Orders with Single Condition

    I am experimenting with entering and taking off contracts at different profit targets. Using the wizard I created the entry conditions outlined below:

    Code:
           protected override void OnBarUpdate()
            {
                // Condition set 1
                if (CrossAbove(Close, SMA(Median, Period1), 1))
                {
                    EnterLong(DefaultQuantity, "Long1");
                    EnterLong(DefaultQuantity, "Long2");
                    EnterLong(DefaultQuantity, "Long3");
                }
    
                // Condition set 2
                if (CrossBelow(Close, SMA(Median, Period1), 1))
                {
                    EnterShort(DefaultQuantity, "Short1");
                    EnterShort(DefaultQuantity, "Short2");
                    EnterShort(DefaultQuantity, "Short3");
                }
    The problem is, I am only getting a single entry when I have the MA cross, when I should have 3 entries with different labels. Am I doing something wrong?
    DaveN

    #2
    daven,

    When you run your strategy you will have an option called Entries Per Direction. You can bump that up to 3 if you want 3 longs and 3 shorts simultaneously.
    JoshNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by StealthM93, Today, 07:58 PM
    0 responses
    2 views
    0 likes
    Last Post StealthM93  
    Started by Mykro, Today, 11:01 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by bauerjj10, Today, 12:24 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Newtrader101, Today, 06:01 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by Steve L, Today, 03:50 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X