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

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 dappa, Today, 09:18 AM
              0 responses
              0 views
              0 likes
              Last Post dappa
              by dappa
               
              Started by bill2023, Yesterday, 08:51 AM
              4 responses
              22 views
              0 likes
              Last Post bltdavid  
              Started by trilliantrader, Today, 08:16 AM
              3 responses
              9 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
              79 responses
              19,662 views
              5 likes
              Last Post zrobfrank  
              Started by funk10101, Today, 08:14 AM
              3 responses
              5 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X