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

Chandelier Exit

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

    Chandelier Exit

    I would like to create an indicator that uses the ATR to calculate a volatility based stop that functions like the Parabolic SAR. I am definitely not a programmer so I guess I kind of need an outline of how to proceed.

    I went through the wizard and set up the indicator's variables:

    one to call the value of the ATR
    one that sets the number of bars used in the ATR calculation
    one that keeps track of the above/below position of the indicator
    one for the multiple of the ATR to be used
    one for the volatility value of the indicator

    The idea comes straight out of Technical Analysis by Kirkpatrick/Dahlquist pg 260.

    The indicator will have a value equal to some multiple times the value of the ATR. For example exit value = 4.5 x ATR.

    So if say the current trend has reversed from short to long (because it was stopped out) and that price is $17 and the 14-period ATR value is 0.625 then the volatility value of the indicator will be

    0.63 x 4.5 = 2.84

    Thus the indicator value initially will be

    $17 - 2.84 = 14.16

    which will be drawn as a dot and is where a stop order would be placed.

    Each new bar where the price increases or the volatility decreases will draw the stop value higher.

    Here is a graph taken from the book to better illustrate what I am after.



    Can someone outline the process of how to program this in NT? I am not asking for the code to be written, but just an overview like:

    where do the variables go, where do the calculations go, how to call the ATR indicator....

    A little knowledge like that could go a long long way. TIA.
    Last edited by kocmodpom; 05-05-2009, 10:18 PM.

    #2
    Hi, before you dive further into your custom code efforts, you can check this one from our sharing, it might be what you're after -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi, before you dive further into your custom code efforts, you can check this one from our sharing, it might be what you're after -

      http://www.ninjatrader-support2.com/...id=135&catid=1
      An indicator indicates a long or short position to enter or exit, but definitely not both simultaneously. That link doesn't indicate anything at all. Here are my main problems with it:

      1. it retreats it's stops! (that is a horrible way to trade, never move your stops further away from the action)
      2. it doesn't reverse, it just resets
      3. it shows both sides at once (I want only one indication at a time.

      So can someone please outline the process of what goes where? I will of course post the finished product.

      Comment


        #4
        Hi kocmodpom, I see - this was just meant as a potential starting point for your project. For the basic structure you can of course also review the Parabolic SAR source code in your NinjaScript editor. But unfortunately we don't offer custom coding services - for this you would need to contact one of those NinjaScript consultants - http://www.ninjatrader.com/webnew/pa...injaScript.htm
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Chandelier Basic

          Here is a modified version of the Chandelier Stop initially coded by
          "Alex Matulich, August 2008" .

          Pat
          Attached Files

          Comment


            #6
            You might also want to checkout the supertrend indicator by roonius and others ...
            It's an ATR based system, simialr to Chandelier

            Comment


              #7
              I get it now, thanks Bertrand. I apologize for my saltiness. It looks like someone has beaten me too it but I will probably try to create it anyway just so I more easily know what to change in the future.

              Good stuff here on the forums.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              11 responses
              3,227 views
              0 likes
              Last Post xiinteractive  
              Started by andrewtrades, Today, 04:57 PM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              7 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              440 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              11 views
              0 likes
              Last Post FAQtrader  
              Working...
              X