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?
    BertrandNinjaTrader Customer Service

    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 -

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        150 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post tkaboris  
        Working...
        X