Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trail the Take Profit

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

    Trail the Take Profit

    Hi, There seems to be a way to Trail the stop with an ATM strategy.

    However I want to program a strategy where I can in effect Trail the Take Profit.

    ( Even if the price moves against a trade, I want the Take Profit point to never be more than a fixed distance from the current price. I realize that if the price moves against you enough it would actually result in a loss when the price finally retraces).

    Can the strategy monitor the price and use the SetProfitTarget function to adjust the Take Profit point as needed?

    Thanks

    #2
    Hello,

    Thank you for the question.

    If you are asking how to dynamically modify the SetProfitTarget, you can do that from OnBarUpdate or any of the other override events.

    In the script if you are currently using SetProfitTarget in only Inititialize, you could also use it in a condition in other places in the script to update the orders Price.

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse. Can I also do this for orders created outside of the strategy?
      In other words Can I use an ATM strategy to manage orders created manually or by another strategy?

      thanks

      Comment


        #4
        Hello,

        Thank you for the reply.

        Unfortunately not,

        An ATM strategy could only be used as a way to manage a manual position submitted from a DOM or from a chart trader. Alternatively an ATM strategy can also be called from a NinjaScript strategy like the SampleATMStrategy that comes with NinjaTrader.

        Because a strategy can only see its own individual position, it would be un aware of manually placed orders or orders from other strategies so that would not be possible.

        I believe the closest to what you are asking would be to have a NinjaScript strategy submit the entry and also submit an ATM order to manage that position. You can find more information about this in the help guide here: http://ninjatrader.com/support/helpG...gy_methods.htm

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X