Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Stop loss suggestions

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

    Stop loss suggestions

    I built a strategy in Strategy Builder which will exit a trade based on price action vs an EMA value, let's say 6. Problem is, even on a 2 min bar, there are parabolic moves which when the bar closes, you could lose some, most or all of the profit value, even putting you in negative position. So intead of exit on price below EMA 6 bar close, I tried Median. Still not working properly. I guess I am not understanding how to avoid these price actions and how to close a trade without losing money.

    Can anyone offer suggestions on how to exit a trade based on price action with an indicator without giving up most of the profits, but still allowing the trade to work with enough breathing room? I am open to anything and everything, even eliminating the indicator to exit.

    #2
    Hello mbrandau,

    Thank you for your note.

    I'm not sure what you mean by "there are parabolic moves which when the bar closes, you could lose some, most or all of the profit value, even putting you in negative position."

    Can you provide screenshots of what you're referring to?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Examples, not as dramatic but examples, the first trade I lost $300 in profit before the EMA 6 kicked in and exited the trade. The 2nd trade I actually lost money when there shouldn't even be a chance of it happening if the exit strategy was correctly coded as price action above EMA 6, exit. Instead what happened is it waited for the candle to close then I lost money. I'm looking to exit mid candle, before close, when price action of intra-candle (2 min candle) is greater than or less than EMA 6. I can tell you the other day I was up $2100 on YM but gave back $800 before the candle closed and only had profit of $1300+. Yes, lots of profit but missed out on 800 additional.

      Comment


        #4
        Hello mbrandau,

        Thank you for your reply.

        If you're wanting your logic to be evaluated mid bar in real time, you would need to set the strategy's Calculate setting to OnPriceChange (since the EMA updates based on price there's no need to use OnEachTick). This will cause your logic in OnBarUpdate (or in the Conditions and Actions screen of the Strategy Builder if that's what you're using) to be processed each time the price is updated.

        If you still want your entries to be calculated once per bar, it is possible to separate your logic so some logic processes on the first tick of the bar while other logic processes with each price update. You can take a look at this example strategy for direction on how that may be achieved:



        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Please show me where on here is the option for OnPriceChange. Like I said, using Strategy Builder. I'm not a coder and am not using Editor.

          Comment


            #6
            Or are you speaking about selecting the drop down INSIDE the strategy attached to the chart, from Calculate on BarClose to OnPriceChange? See attached

            Comment


              #7
              Hello mbrandau,

              Thank you for your reply.

              You can set a default for the Calculate setting in the Strategy Builder on the Default Properties screen within the Strategy Builder. You'd have to hit the back button a couple of times from the Conditions and Actions screen to get there. It's the very first setting at the top of that page.

              You can also modify this at run time by changing the Calculate setting in the Strategy Properties when you apply it to a chart as you've pointed out in your second screenshot.

              Please let us know if we may be of further assistance to you.
              Kate W.NinjaTrader Customer Service

              Comment


                #8
                oh ok, this may be the solution. Much appreciated for this and glad it's simple.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by fx.practic, 10-15-2013, 12:53 AM
                5 responses
                5,404 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by Shai Samuel, 07-02-2022, 02:46 PM
                4 responses
                95 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by DJ888, Yesterday, 10:57 PM
                0 responses
                8 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by MacDad, 02-25-2024, 11:48 PM
                7 responses
                160 views
                0 likes
                Last Post loganjarosz123  
                Started by Belfortbucks, Yesterday, 09:29 PM
                0 responses
                9 views
                0 likes
                Last Post Belfortbucks  
                Working...
                X