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

Different trailing stop

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

    Different trailing stop

    Has anyone implemented the strategy as detailed in Active Trader Nov 11 page 56?
    The true range trailing stop increments at each 40 period Hi/Lo. Seems like
    different way of implementing a trailing stop.

    #2
    BertW,

    Thanks for your note.

    Unfortunately without the article itself I am unable to comment further.

    Hopefully someone will be able to help you out with this, or if you have a more detailed description of the method I may be able to comment.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      The article describes a 2 times 10 period average median true range trailing stop that increments at every 40 period hi or lo. Variables could include the length of the increment period, the length of the average median true range, & the distance between the price close & average median true range.

      Comment


        #4
        BertW,

        This is entirely possible in NinjaScript. There are functions for calculating the median, and then you can input it as a dataseries into the ATR indicator. There are also ways of calculating the High/Low over the last X number of bars. You could create an indicator for the ATR-Median as follows, then implement the rest possibly in the strategy wizard.

        In OnBarUpdate()

        Medians.Set(GetMedian(Close,lookbackPeriod));
        ATRM.Set(Medians,period);

        Of course you will need to setup the Medians and ATRM as dataseries or plots.

        If you need help with this, I would suggest contacting a NinjaScript consultant. Please find a link below.

        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Tim-c, Today, 02:10 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        2 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        50 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        10 responses
        400 views
        1 like
        Last Post beobast
        by beobast
         
        Started by lorem, Yesterday, 09:18 AM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X