• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Open-Close Pip Counter

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

    Simple Open-Close Pip Counter

    Hi All,

    I'm looking for an indicator that counts the total number of pips of a candlestick from open to close.

    "open-close = pips range of every bar"

    I know that Metatrader has one but cannot find one for Ninjatrader. If anyone can program one I would really appreciate that too.

    Thanks!

    #2
    Hello Volcom,

    Thank you for writing in.

    The NinjaTrader support team does not provide programming services, however, we are able to provide resources on how you can accomplish your task.

    You would be able to utilize Bars.TickCount to calculate the total number of ticks (pips) of the current bar within your indicator: https://ninjatrader.com/support/help.../tickcount.htm

    Please note that this is a real-time property and will only work in real-time.

    If you wish for someone to program your indicator for you, please let me know. I will forward you to our business development department who can connect you with a NinjaScript consultant.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      @Ninjatrader_ZacharyG - I'm not looking for a high low bar pip counter, I'm looking for an indicator that counts the pips from open to close per bar. I am also not a programmer and was asking the Ninjatrader community. I did not want to be directed to your business development department for this.

      Can someone else please respond if they have an indicator or can program
      one? It would be much appreciated.

      Thanks.
      Volcom

      Comment


        #4
        Originally posted by Volcom View Post
        @Ninjatrader_ZacharyG - I'm not looking for a high low bar pip counter, I'm looking for an indicator that counts the pips from open to close per bar. I am also not a programmer and was asking the Ninjatrader community. I did not want to be directed to your business development department for this.

        Can someone else please respond if they have an indicator or can program
        one? It would be much appreciated.

        Thanks.
        Volcom
        What you have asked for is shipped as one of the standard indicators in NT, and you have already specified the name in your description. It is called the Range indicator.

        Comment


          #5
          @koganam

          The Range indicator you are referring to only calculates the High and Low range of a bar. What I am looking for (that I mentioned in my original post) is the range of a bar from Open to Close.

          Comment


            #6
            Originally posted by Volcom View Post
            @koganam

            The Range indicator you are referring to only calculates the High and Low range of a bar. What I am looking for (that I mentioned in my original post) is the range of a bar from Open to Close.
            Ah, my mistake. I should have read a bit more carefully.

            How about I help you do it yourself, so you can feel how simple it can be?
            1. Start by bringing up the Range indicator in the editor. Using the Control Center menu, click on Tools-->Edit NinjaScript-->Indicator...
            2. Right-click in the editor window and select Save As... from the popup menu.
            3. Type a name in the dialog box: e.g., OpenToCloseRange, and click OK to save the file.
            4. Now, in the OnBarUpdate() block, edit the line:
              Code:
              Value.Set(High[0] - Low[0]);
              to read instead:
              Code:
              Value.Set(Math.Abs(Close[0] - Open[0]));
              if you want to know just the amount of travel, or:
              Code:
              Value.Set(Close[0] - Open[0]);
              which, by its sign will tell you whether the bar closed above (positive) or below (negative) the open.

            5. Once you have done that, compile your classes by hitting the F5 function key and wait for the sound to tell you that compilation is complete.
            6. Enjoy!
            Last edited by koganam; 05-14-2016, 08:36 PM. Reason: Corrected spelling.

            Comment


              #7
              @koganam

              THANK YOU koganam!!! Your clear directions worked perfectly. Pure genius! Take care and thanks again.

              -Volcom

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by danitralla, Yesterday, 03:33 AM
              1 response
              20 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Started by ninjo, Yesterday, 11:54 AM
              0 responses
              6 views
              0 likes
              Last Post ninjo
              by ninjo
               
              Started by deblanka, Yesterday, 08:56 AM
              0 responses
              13 views
              0 likes
              Last Post deblanka  
              Started by Boonfly8, 03-22-2019, 12:30 PM
              7 responses
              25 views
              0 likes
              Last Post sledge
              by sledge
               
              Started by Sohal, Yesterday, 05:02 AM
              2 responses
              23 views
              0 likes
              Last Post techmint  
              Working...
              X