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

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

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ghoul, Today, 06:02 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        44 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        180 views
        0 likes
        Last Post jeronymite  
        Started by DanielSanMartin, Yesterday, 02:37 PM
        2 responses
        13 views
        0 likes
        Last Post DanielSanMartin  
        Working...
        X