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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          63 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          35 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          54 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          61 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          48 views
          0 likes
          Last Post CarlTrading  
          Working...
          X