Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter if touch strategy?

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

    Enter if touch strategy?

    I read several online documents teaching day-trading Forex saying the one should place a long order if the price goes above the resistance and short if it goes below the support.

    Now I remember reading something saying that one could place an order watching both way, one is canceled if another one is triggered. For example, the short order is canceled if the long order is placed! And vice versa! (I can't remember the name!)

    Is it possible to realize it in NT strategy!?

    Thank you very VERY much for teaching me! God bless you!!!

    #2
    Hello YoutingChu,

    Yes this type of logic could be possible in NinjaScript. Likely the most simple way would be to use Order objects to track the orders, and then CancelOrder() to eliminate the orders that are no longer needed.

    We have a sample that demonstrates the syntax needed to collect the order and also cancel it here: https://ninjatrader.com/support/help...thod_to_ca.htm

    I look forward to being of further assistance.

    Comment


      #3
      Dear Jesse,

      Thank you very much for your help! I have been studying the sample code this couple days, I find out I have NO confidence monitoring all the orders correctly! I'm afraid I might buy extra orders or, even worse, forget to exit any order!

      I figure out what I'm looking for is OCO orders! Is it possible to place an OCO order DIRECTLY and let the internal algorithm do the canceling jobs for me!?

      Thank you very VERY much for your help! God bless you!!!

      Comment


        #4
        Hello YoutingChu,

        Thank you for your response.

        If you wish to place the orders manually you can use one of the Order Entry windows and enable OCO before placing both orders, then disabled OCO to ensure that only those two orders are tied together.

        You can find information on the Order Entry windows in NinjaTrader at the following link: https://ninjatrader.com/support/help...rder_entry.htm
        You can find information on OCO in NinjaTrader at the following link: https://ninjatrader.com/support/help...OtherocoOrders

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        56 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        132 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X