Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop loss in automated strategy

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

    Stop loss in automated strategy

    Hi all. My strategy is working well only last night I realized a glitch in my setup. I have two ways to exit a trade- the first is a 16 tick stop loss and then if price crosses a MA it exits the position. The idea is that often when a trade opportunity arises it is close to the MA exit line. I watched the trade progress and it stopped out at 9 ticks when it crossed the MA but would have gone on to be a highly profitable trade if it had kept the 16 tick stop loss.
    Is there a way of setting it so that the MA exit is not triggered to exit in the initial stages?
    Thanks
    raycam

    #2
    raycam, I think you can work with the 'Unrealized (Open) PnL' for this, just use the MA trail only when profit is higher than amount X

    Comment


      #3
      Thanks mate- I will give it a go!
      raycam

      Comment


        #4
        Having trouble with this.
        In my set 3 of conditions and actions I have the following...
        "Position.MarketPosition==MarketPosition.Short
        CrossAbove(Close,SMA(32),1)"

        When I click add and select "Unrealized PnL" Currency >= Numeric value of 100
        I end up with this...
        "Position.GetProfitLoss(Close(0), PerformanceUnitCurrency)>=100"

        Is that how it is supposed to look so that when a trade is entered it will rely on my set stop loss until profitable to $100- at which point the SMA comes into play.

        Hope this makes sense.
        My head spins when I venture away from the wizard.
        And even in the wizard things are blurry.
        THX
        raycam

        Comment


          #5
          That is the correct listing for Unrealized PnL.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          52 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          142 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X