Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I am Stuck please help

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

    I am Stuck please help

    Hello

    I try to build a Strategy with the Strategy Builder tool

    I got my entries my exits and my trailing stop .

    But i don t get my breakeven to work .

    I tried this logoc and maybe its totally the wrong though

    // Condition set 3
    if (Position.MarketPosition == MarketPosition.Long
    && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) == 30)
    {
    EnterShortStop(DefaultQuantity, 30, "");
    }

    // Condition set 4
    if (Position.MarketPosition == MarketPosition.Short
    && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) == 30)
    {
    EnterLongStop(DefaultQuantity, 30, "");
    }
    }

    #2
    Nikopol, you set the stopprice to 30, which would not make sense as value, you would need to enter the stop price level at which you want to place the stop.

    How did you setup the trailing stop aspect in the wizard?

    Comment


      #3
      The Part for the Trailing stop

      SetTrailStop("", CalculationMode.Ticks, 50, false);

      Comment


        #4
        Thanks - if this is still working as you attempt to place another Enter method order this will get you unfortunately into conflict with NT's internal order handling rules -

        http://www.ninjatrader-support.com/H...verview36.html (botton section here)

        For a combination of initial stoploss, raising it to breakeven and trailing further as the trade progresses you would need to custom it in our NinjaScript editor, for example with the help of this sample -

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        77 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        27 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        64 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X