Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TP/SL is not working often

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

    TP/SL is not working often

    Hi,

    is there any possibility to working TP/SL intermittently (it was set currency , ex:60$)?
    Last edited by bosajin; 07-15-2020, 01:46 PM.

    #2
    Hello bosajin,

    Thanks for your post.

    If you are calling SetProfitTarget/SetStopLoss in OnBarUpdate, the methods must be called when the strategy is flat, before the entry order is submitted. Please follow the example below when doing so.

    SamplePriceModification - https://ninjatrader.com/support/help...of_stop_lo.htm

    If the Currency that is used for the order results in an order level that is less than one tick from the average entry price, this can result in an invalid order submission that would be ignored.

    If you increase the Currency value used, do you see this behavior?

    When you test with TraceOrders enabled, do you see any feedback for the stop/target submission?

    TraceOrders - https://ninjatrader.com/support/help...aceorders2.htm

    I look forward to assisting.

    Comment


      #3
      This answer makes no sense. You say "If you are calling SetProfitTarget/SetStopLoss in OnBarUpdate, the methods must be called when the strategy is flat, before the entry order is submitted. Please follow the example below when doing so." Then you give a link to a documentation page with an example. In that example, it calls SetStopLoss in two places, one place where we are flat and the other where we are in a LONG position. The fact that the example calls SetStopLoss when in a long position contradicts the statement that the methods must be called when flat.

      Can someone at NT support please clarify this and state explicitly when and how you must call SetStopLoss and SetTakeProfit when submitting an order? The vast majority of us want to do this at the time the order is submitted, and we want the freedom to set these dynamically. The documentation on this is very sketchy. Please clarify.

      Comment


        #4
        Hello westofpluto,

        Set methods prep NinjaTrader to submit target and stop loss order when an associated entry order is seen as filled. They should be submitted before the associated entry method is submitted.

        You can call Set methods when the strategy is in a long position to move the stop loss or profit target, but if the Set method is not called before the associated entry order, then NinjaTrader will submit target/stop to the last level that was set when the Set method was called. This can mean that when your entry order fills, the target and stop are submitted to previous levels which may be invalid. The order submission for the target/stop can then be ignored or rejected.

        Therefore, it is suggested to reset your target/stop to initial levels when the strategy is flat, before the next entry is made. Or if you are scaling in to an existing position, to ensure that the Set methods associated with the new entry are called before that entry method is called.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X