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 bortz, 11-06-2023, 08:04 AM
                47 responses
                1,607 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                9 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                19 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                6 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                16 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X