Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Targets and Trail StartBehavior

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

    Multiple Targets and Trail StartBehavior

    Hello,

    I need help with my strategy... The issue is that the strategy does not wait until flat before submitting a new order, although StartBehavior is set to WaitUntilFlat.

    It is entering with three contracts… I created three Limit Orders, all submit on the same set of conditions, but each order has its own unique quantity & signal name… I added ProfitTargets to 2 of the Orders, and the last has no ProfitTarget, it only has a TrailingStop… I tried UniqueEntries and AllEntries; as well as setting Entries per direction to 1 and then I tried 3... Still, the strategy would submit new orders although the trailing contract is still working.

    I was wondering, is it possible to have one LimitOrder with Quantity 3 contracts, and then change the quantity for the ProfitTargets? My aim is for the strategy to have a variable for ProfitTarget Quantity and for it not to submit new orders while one contract is still trailing.

    #2
    Hello KINGKODA,

    Thanks for your post and welcome to the NinjaTrader forums!

    The start behavior addresses the strategy transition from historical to live. When your strategy is applied it will begin performing trades on the historical data. If, on the last historical bar there is a historical trade in progress then on the first live bar the status would show yellow indicating that the strategy is waiting to complete the historical trade before initiating a live trade.

    From your description, I think you are trying to use the start behavior to prevent orders from being placed until you are flat in the normal course of the strategy run. What you would want to use as part of the entry conditions is a check of the market position. For example:

    if (Position.MarketPosition == MarketPosition.Flat && (your other entry conditions))
    {
    // enter the 3 orders here
    }
    Reference: https://ninjatrader.com/support/help...etposition.htm

    You would need to keep the individual orders so you can tie the trail stop to 1 and stoploss to the others by the signal names.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X