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 Shansen, 08-30-2019, 10:18 PM
        24 responses
        938 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        3 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        2 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Working...
        X