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

Custom Indicator (Prev Std Dev's above the Open)

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

    Custom Indicator (Prev Std Dev's above the Open)

    Hi

    Can someone help me with building a Custom Indicator for NT 6? What I need is to build an Indicator of:

    Current Open Price (0) + 2 Std Dev of (Highs - Opens) [for n periods back].

    What I need is to add, to the current Open, 2 Std Dev of the Diff between Highs and Opens. For whatever past periods I choose (i.e. 14)

    For example: As soon as a Bar Opens I want to plot above that open, 2 Std Dev (of the difference between the Highs and the Opens for the past "x"periods).

    What I do in excel is that I calculate for each of the previous Bars the difference between the High and the Low, and from there I calculate the Std Dev of those differences for the Period that I select (i.e. 14). Finally I add the last Std Dev (14) * 2 to the current open. That gives me an idea of the expected magnitud of my potential new High. The larger it is, the more consistent it is with a Long position and viceversa, the shorter it is, the more consistent with a Short position.

    Thanks in advance for your help

    HJS

    #2
    Sounds simple but I think there is an inconsistency in your post. At first you said (Highs - Opens), but when talking about your spreadsheet, you said "the difference between the High and the Low". Am I misunderstanding or is there a typo?

    Comment


      #3
      Custom Indicator (Prev Std Dev's above the Open)

      Thanks Pete for your prompt response.

      You are right, it was a big typo! What I mean is the difference between Highs and Opens of each day.

      Thanks again.

      HJS

      Comment


        #4
        Pete,

        Here is a print of the spreadsheet that I use in Excel. The last Column in light blue is what I need to Plot after each new Open.

        Later, after finding how to do this, I will do the same for Opens - Lows.

        Thanks again

        HJS
        Attached Files

        Comment


          #5
          Here's what I think you described. Take a look and let me know, I'm still not 100% sure this is what you meant.

          Oh, and I did this on 6.5, but there should not be anything 6.5 specific in it.
          Last edited by Pete S; 12-20-2007, 02:15 PM. Reason: Remove old file.

          Comment


            #6
            Thanks Pete!

            I really appreciate your help, I took a quick look at it and it seems to be exactly what I needed. I need to leave now but the only question I have is what about if I want to change the #of Std Dev's? let's say from 2 to 1? should I do it directly in the Script Editor? I didn't see it as a Parameter to change, in the same way as the Period is.

            Thanks again!

            Hector

            Comment


              #7
              Modified to include # of std devs as a param. It's a double so you can use fractional values e.g. 1.5.
              Attached Files

              Comment


                #8
                Pete S,

                Thanks for your contribution, we at NinjaTrader appreciate it.
                RayNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by f.saeidi, Today, 07:07 AM
                5 responses
                13 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by Creamers, 04-27-2024, 05:32 AM
                9 responses
                60 views
                0 likes
                Last Post Creamers  
                Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
                19 responses
                59 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by samish18, 04-17-2024, 08:57 AM
                26 responses
                116 views
                0 likes
                Last Post samish18  
                Started by llanqui, Today, 11:13 AM
                3 responses
                3 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X