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

How to set up profit and loss targets

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

    How to set up profit and loss targets

    Apologies if this is a bit basic. I want to set up a "Set" to exit a position when a profit target is reached. I ended up with this "Close[0] >= Position.AvgPrice + 12 * TickSize". I got there by selecting Close price on the left pane of the Condition builder, selecting Average position price in the right pane, and setting the offset to 12 (which is my profit target, 12 ticks). Is this correct? Seems a bit convoluted to me, but I haven't been able to come up with anything else.

    Also, is there a way to set up a trailing stop using the Wizard? Do I need to set up two "Sets", one to increment a user defined variable, and the second to test the latest Close against the same UDV?

    Thanks,
    Ian
    Last edited by Owlman; 12-12-2008, 04:57 AM.

    #2
    Hi Owlman,

    You can set your target easier when moving to the Stop and Targets section of the wizard and entering it there - http://www.ninjatrader-support.com/H...rdScreens.html

    You will also be able to set a TrailingStop there, see also this link for your TrailingStop calculation mode options - http://www.ninjatrader-support.com/H...TrailStop.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response!

      I had those set too, but they didn't seem to work. I set the stop for 8 ticks on the S&P, which is 2 points, but the first time I tried it the trade did not stop out at 2 points. I thought the strategy may have thought the stop was at 8 points (which didn't get hit) rather than 8 ticks, but I haven't verified that.

      I also notice that the options for trailing stop are very limited. I have set up a trailing stop strategy in the ATM, which works well but I can't set it up the same way using the strategy stops, so I'm going to have to figure some way to do it in the Sets, just haven't gotten around to doing it yet, still experimenting...

      Cheers,
      Ian

      Comment


        #4
        If you want more functionality than the basic one provided by SetTrailStop() you will have to do custom programming. Also, you cannot set a regular stop and a trailing stop simultaneously for the same entry order.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh,

          I didn't have both set at the same time, but I've since discovered why the stop didn't work. I had the wrong name in the signal name in the stop (just a typo). Custom programming of the trailing stop will be my next port of call!

          Cheers,
          Ian

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ETFVoyageur, Today, 12:52 AM
          0 responses
          4 views
          0 likes
          Last Post ETFVoyageur  
          Started by Board game geek, Yesterday, 02:20 AM
          2 responses
          21 views
          0 likes
          Last Post Board game geek  
          Started by jackiegils, Yesterday, 11:05 PM
          0 responses
          5 views
          0 likes
          Last Post jackiegils  
          Started by cre8able, 05-09-2024, 09:15 PM
          2 responses
          17 views
          0 likes
          Last Post cre8able  
          Started by Trader146, Yesterday, 09:17 PM
          0 responses
          10 views
          0 likes
          Last Post Trader146  
          Working...
          X