Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trail Stop

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

    Trail Stop

    SetTrailStop("", CalculationMode.Currency, Tsl, false);

    I have put in the above code for Trail stop, but the trail stop is not working, please advice.
    Tsl is the variable for the value.
    There is no stop loss in the code, only profit target and trail stop.
    Last edited by siniaglobal; 02-22-2018, 03:59 AM.

    #2
    Hello siniaglobal,

    Thanks for your post and welcome to the NinjaTrader forums!

    "...the trail stop is not working..." - Do you mean it is not moving and/or it is not exiting the trade if hit?

    Are you testing this in the strategy analyzer, playback, or live data on the chart?
    What bar type and size are you using?
    If using live data, what Calculate mode are you using?

    If possible, please post your source code file for review. If you prefer not to post in public, you are welcome to send the strategy code file to PlatformSupport[st]NinjaTrader[dot]Com. Mark the subject line, "Atten: Paul" and include a link to this forum thread Please attach your source code file as found in Documents>NinjaTrader8>bin>Custom>stratgey> and will be your strategy name with .CS extension.

    Comment


      #3
      The trail stop i snot getting executed, only profit target is executing.
      Iam testing it on strategy analyzer.
      I did not put stop loss in the strategy as stop loss and trail dont work together.
      i was trying it on intrument 6E 0318
      Attached Files

      Comment


        #4
        Hello siniaglobal,

        Thanks for your reply.

        In review of the helpguide for SetTrailStop, I find this note: "CalculationMode.Price and CalculationMode.Currency are irrelevant for trail stops. Attempting to use one of these modes will log a message and the stop order be ignored. Please use SetStopLoss() for these modes instead."
        Reference: https://ninjatrader.com/support/help...ttrailstop.htm

        A common alternative is to use the Calculation mode of Ticks.

        I will also reply to your e-mail.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X