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 NullPointStrategies, Today, 05:17 AM
    0 responses
    23 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    120 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X