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

when use OnOrderUpdate() method vs a strategy calling an ATM

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

    when use OnOrderUpdate() method vs a strategy calling an ATM

    Hello
    on NT8 help on line at https://ninjatrader.com/support/help...and_onexec.htm
    there is the following definition: “OnOrderUpdate() method is updated whenever the state of an order changes which allows you to submit and control your stop-loss and profit target orders … “ which I understand is what also an ATM does.
    Could you please explain show by an example what are the differences between the two methods in order to get dynamic stop loss and targets?
    When is it better/advisable to use OnOrderUpdate() method vs a strategy calling an ATM?
    Thank you.


    #2
    Hi guidoisot, thanks for your question.

    The difference between the ATMStrategySubmit and placing your order in OnOrderUpdate is the convenience of using an ATM vs the amount of control you have. We have an example that uses OnExecutionUpdate and OnOrderUpdate to submit protective orders to entry order that have been filled:



    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3

      Hello Chris.
      Thank you for your reply.
      I understand that the control given by the sample is one SL with trailing and one target profit, just for longs. Whereas the ATM method allows for more complex setups.
      What are the additional control the OnOrderUpdate it could give? Maybe, possibly keeping in mind that many platform users are not experienced programmers, NT could provide more information for an easier evaluation, comparison and selection between these two methods. Maybe showing a sample application inclusive of backtesting comparison analysis of both methods to the same strategy, say to a SMA crossover sample strategy, or any other, would be very useful.
      Actually, I think an entire educational webinar video about this would be great.
      Otherwise these type of "complex" tools remain unapproachable to most and exploitable exclusively just by those users who have a high level of programing skill.
      Best regards.

      Comment


        #4
        Hi guidoisot, thanks for your reply. I understand the approach you are coming from. The fact of the matter is everything is documented and at this point, it would be up to the user to know the tools that are available. It helps to just start at the most basic levels of strategies, then move on to more complex things, like adding a static stop first, making sure that works, then graduate to more complex things like trailing stops for example. Here would be some good exercises to get more comfortable with the tools that are available:
        1. Make a strategy that has no stops and only exits based on exit conditions, like the SMACrossover strategy.
        2. Make a strategy that has a stop loss, use SetStopLoss() within State.Configure. Practice this type of strategy until you are confident how static stop losses work, try it in OnBarUpdate as well calling it before new entries are made to make a trailing stop.
        3. Make a strategy that has a trailing stop using SetTrailStop within State.Configure. Again, get comfortable with how this works, try it in OnBarUpdate as well.
        4. Import and understand fully this sample strategy:
          https://ninjatrader.com/support/help...of_stop_lo.htm
        5. Take a pause from manual stops, then study the SampleATMStrategy. Notice how this kind of strategy is completely different than the previous strategies you have been making.
        6. Practice and fully understand how ATM's are used in NinjaScript strategies.
        7. Now if you are comfortable with all of the concepts of strategies up to this point, move to practicing strategies with advanced order handling (order objects, OnOrderUpdate, OnExecutionUpdate, etc) See the example that was posted previously.
          https://ninjatrader.com/support/help...and_onexec.htm

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi Chris,
          thank you for your help.
          I think I am familiar with the first three point. I will go try to go through the following 4. In case I need for some more assistance bout them, I will try to ask.
          Thanks.
          gt

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Taddypole, 04-26-2024, 02:47 PM
          2 responses
          12 views
          0 likes
          Last Post Taddypole  
          Started by futtrader, 04-21-2024, 01:50 AM
          6 responses
          58 views
          0 likes
          Last Post futtrader  
          Started by sgordet, Today, 11:48 AM
          0 responses
          4 views
          0 likes
          Last Post sgordet
          by sgordet
           
          Started by Trader146, Today, 11:41 AM
          0 responses
          5 views
          0 likes
          Last Post Trader146  
          Started by jpapa, 04-23-2024, 07:22 AM
          2 responses
          22 views
          0 likes
          Last Post rene69851  
          Working...
          X