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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X