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

Problem with positions of Stop loss and Take profit

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

    Problem with positions of Stop loss and Take profit

    Hello everyone,

    My strategy created Stop loss or Take profit, but when I trying to change their prices by dragging them to the another position on my chart. The problem is that they coming back when recent bar closed. Maybe there is a solution to this problem. If it is please tell me about it.

    #2
    Hello AntonTymoshchuk,

    Thanks for your post.

    This would be expected behavior of a strategy that is not specifically built for moving the profit/stops. The strategy is executing according to the code which is putting the profit/stop as coded.

    If you wish to directly interact with the strategies stop/profit targets then you would need to create a strategy that calls and uses an ATM template to control the exiting of a position. These type strategies will find the entry conditions specified in the code and place an order, once the order is filled the ATM takes over until either the stop or target is hit, then control returns to the strategy to find the next entry. While the ATM is running, you may adjust the stop/profit as desired.

    An example strategy can be found in your NinjaTrader called SampleATMstrategy. This example is well commented/documented internally to help in understanding the special methods and properties that this type strategy uses. In addition you would need to review the helpguide section here: https://ninjatrader.com/support/help...gy_methods.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    32 views
    0 likes
    Last Post Pattontje  
    Started by abdo22, Yesterday, 03:15 PM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by f.saeidi, Yesterday, 02:09 PM
    3 responses
    20 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Jltarrau, Today, 05:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by kujista, Today, 06:23 AM
    0 responses
    2 views
    0 likes
    Last Post kujista
    by kujista
     
    Working...
    X