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

Stops and Targets

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

    Stops and Targets

    This is the first time I'm trying out both NT and automated strategy. I'm having some issue with setting stops and targets section. I've attached both sample trades and my stop targets. Please have a look at few trades such as 1360, 1368, 1369, 1370, 1371, etc. All these trades were more $1000 in the money, but closed out in loss or for very less profit. What am I doing wrong? I'd really appreciate any help on this. Thanks!
    Last edited by kjthanu; 04-19-2020, 12:18 AM.

    #2
    Hi kjthanu, thanks for your post. Were happy to have you here on the NinjaTrader forum.

    The first problem I see is that you are using SetStopLoss and SetTrailStop together. This can not be done per the note on the help guide page here:


    You will need to use one or the other to have the strategy set stop losses correctly.

    I look forward to hearing of your results.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello Chris,

      Thank you for quick response. Is it possible to implement this following strategy stops and targets?
      Stop loss = 20 ticks
      Profit Target = 400 ticks
      Trail stop (when the position is in the money) = 20 ticks

      Thanks!

      Comment


        #4
        Hello kjthanu,

        Thanks for the post.

        Yes that is possible but with limitations in the builder. The SetStopLoss and SetTrailStop methods cannot be used concurrently so you would need to control the order yourself using a stop market order instead of using the stops and targets page.

        This is less accurate and difficult to do in the builder. This is because the stop is no longer based on the fill and is based on a condition. The condition which submits the stop needs to remain true for as long as the stop should work. If you want to additionally trail at some point you also need the condition for the trailing to happen which is another set of logic.

        Another point is turning the first condition off when the trailing starts which will likely require using some variables and multiple sets for a single stoploss. This is generally much easier and much more accurate in manual coding because you can save a variable for the order to use and also use the events such as the fill of the entry to trigger the stop. In manual coding you can also just use the SetStopLoss instead of a stop market order to eliminate most code and use what the builder is essentially doing with the stops and targets page in a more advanced way.

        There are a few samples of trailing in the following post using the managed approach. These are manually coded samples but would be a good starting point if you wanted to control a stop in that way in an accurate way. https://ninjatrader.com/support/foru...269#post802269





        I look forward to being of further assistance.


        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you! Let me have a look at this. Appreciate the reply and effort. Thanks again.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by elirion, Today, 09:32 PM
          0 responses
          4 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by cre8able, Today, 09:15 PM
          1 response
          7 views
          0 likes
          Last Post bltdavid  
          Started by cummish, Today, 08:43 PM
          0 responses
          13 views
          0 likes
          Last Post cummish
          by cummish
           
          Started by Option Whisperer, Today, 07:58 PM
          4 responses
          21 views
          0 likes
          Last Post Option Whisperer  
          Started by ETFVoyageur, 05-07-2024, 07:05 PM
          13 responses
          87 views
          0 likes
          Last Post ETFVoyageur  
          Working...
          X