Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dragging stop or target while my strategy is running.

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

    Dragging stop or target while my strategy is running.

    Hi,

    I am using a strategy that when you enter a position it also sets a stop and a target. However, I would like to change the stop or target by dragging on the chart but when I try this, I can't move the stop/target. Do I have to include something in the code?

    Thank you

    #2
    Hello lju45,

    Thank you for your post.

    If you wish to be able to manually move the stop loss and profit target you would need to use different strategy methods that interact with an ATM template. There is an example of the coding required called SampleATMstrategy that comes default with NinjaTrader and is well documented internally by comments. To view the code, open a New > NinjaScript Editor window, double-click the Strategies folder, and double-click the SampleATMStrategy.cs file.

    See the help guide documentation section linked below on Ninjascript ATMstrategyMethods.
    https://ninjatrader.com/support/help...gy_methods.htm

    Your strategy would create the entry conditions and then the ATM template would be in play after the entry order is filled. Once a profit target or stop loss is hit, control returns to the NinjaScript strategy.

    Please note that you would not be able to use the strategy in the Strategy Analyzer as ATMs cannot be backtested (except for using playback with Market replay data).

    Let us know if we may assist further.
    <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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X