Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by 00nevest, Today, 02:27 PM
    1 response
    8 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    8 views
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    7 views
    0 likes
    Last Post Philippe56140  
    Working...
    X