Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Manually moving stop and target order

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

    Manually moving stop and target order

    i'm using managed order to place my stop and target.
    SetStopLoss("LE1", CalculationMode.Ticks, OrderStopTicks_1, false);
    SetProfitTarget("LE1", CalculationMode.Ticks, OrderTargetTicks_1);

    Once i enter the long position it places the stop and target order properly , and when i try to move my stop or target order manyally strategy brings it back to same price. is there a way to handle this. i do want to use SetStopLoss & SetStopLoss concept. ​

    #2
    Hello pwtrades,

    Thanks for your post and welcome to the NinjaTrader Forums!

    When using Set methods, orders will move back based on the strategy's Calculate mode. For example, if you use a Calculate mode of OnBarClose, the Set methods would move back to their original position on the close of a bar.

    Instead, you would need to use Exit methods such as ExitLongStopLimit with the isLiveUntilCanceled property set to true and ensure that your logic is only calling the Exit methods once so that the order does not reset. When the isLiveUntilCanceled property is set to true the order will NOT expire at the end of a bar but instead remain live until the CancelOrder() method is called or its time in force is reached.

    Please refer to the help guide link below regarding Exit methods and the isLiveUntilCanceled property.



    Also, please refer to the attached example strategy demonstrating how this could be accomplished.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      thanks Brandon, i am aware about ExitLongStopLimit and isLiveUntilCanceled as possible approach and have used it few times it past, however it becomes complicated when dealing with multi positions and have to account for partial fills scenarios as well & dependencies on Rithimic API order update issues does not help as well.

      I like setStoploss approach and knowing that NT handles the entire order handling my job is to set and let NT handle it. the only part missing is at times i want to move my target *manually*.

      Comment


        #4
        Hello pwtrades,

        Thanks for your notes.

        Unfortunately, if you are using Set methods then when OnBarUpdate() triggers the stops/targets that you manually moved will be moved back to their original position. There would be no means available for preventing this behavior from occurring when using Set methods.

        To be able to manually modify stops/targets on the chart you would have to use Exit methods with isLiveUntilCancelled set to true as noted in post # 2.

        If you are using Rithmic, you could take a look at the RithmicIBFriendlExamples reference samples on this forum thread: https://forum.ninjatrader.com/forum/...72#post1206372
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        569 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
        548 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