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

Bar Count Indicator

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

    Bar Count Indicator

    I was wondering if anyone has seen an indicator for NT8 that would count how many candles occur in a day? Right now I have a strategy that uses tick charts and knowing how many tick bars occur in a day could give me some indication of the volatility of the market. A low bar count for the day would mean that there is very little volatility and then I would adjust the tick size accordingly to account for it.

    Edit: I am not talking about an indicator that puts numbers on each candle, all I want is the total number of candles/bars per day.

    I was wondering if it is possible to create such an indicator. I'm not a programmer.
    Last edited by Delerium; 01-17-2019, 11:18 AM.

    #2
    Hello Delerium,
    Thanks for your post.

    It would be possible to create such an indicator.

    You mentioned that you are not a programmer -- Do you want to learn? Would you prefer to hire someone to create this for you?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      No I don't want to create one and programming is a bit beyond my abilities.

      I was wondering if anyone has seen such an indicator and was able to share it.


      Comment


        #4
        I have an indicator that counts bars. It works but the problem is that it begins counting bars at the beginning of the session (i.e. for futures it begins counting at 17:05 hrs.).

        I want the counter to begin with the US session i.e. 08:30 hrs.

        I am not a programmer, but I am willing to learn. I have programmed in other languages, but ninja script is new to me.

        Please advise/assist.

        ~Don

        Comment


          #5
          Hello donstar,

          Thank you for your reply.

          I apologize for our late reply - sometimes with older threads we don't get informed there's a new post - it's usually better to start your own thread if the one you're looking at is older than about a year or so.

          You could certainly modify the indicator to only start counting at a specific time, such as the 08:30 open and end counting at the end of the US Session. I'd recommend though, to start small as you'd need to manually code this into the original indicator so you'll need to have a basic grasp on NinjaScript first.

          NinjaScript is based on the C# (pronounced "C Sharp") programming language developed by Microsoft and first released in 2002. C# is a general-purpose programming language based on the popular C and C++ languages and utilizing Microsoft's .NET framework. Basing NinjaScript on C# means that it can take advantage of all the functionality of C# and.NET and that it can be compiled with existing Microsoft C# compilers.

          NinjaScript is consistent with the underlying design of C#, which is object-oriented, event-driven, and component-based. The functionality added to C# to create NinjaScript is located in the NinjaTrader namespace. I'm including a number of resources below that will help you in learning NinjaScript. All links below are publicly available.

          The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

          I'm also providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.

          Strategy Builder 301
          NinjaScript Editor 401

          If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our NT7 help guide first:

          Basic Programming Concepts

          For general C# education I have personally found Dot Net Perls to be a great reference site with easy to understand examples.

          Browse examples for many languages, with explanations and code side by side for easy understanding.


          We also have great resources in relation to Strategy Development on our Support Forum. There is a very active developer community in our support forum that supplements the responses provided by NinjaTrader support staff providing all users with an exceptional support experience.

          Take me to your support forum!

          There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under New -> NinjaScript Editor -> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

          We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:

          Click here to see our NinjaScript Reference Samples
          Click here to see our NinjaScript Tips

          These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

          Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.

          Alphabetical Reference

          And our Educational Resources in the NinjaTrader 8 help guide.

          Educational Resources

          A set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide. I'd specifically take a look at the section on creating Time Filters, as you can set that up and then unlock the code to see how that would be structured so you can use that in your modified indicator.

          Condition Builder

          You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

          Please let me know if I may be of further assistance.

          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by MarianApalaghiei, Today, 10:49 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          8 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          46 views
          0 likes
          Last Post bill2023  
          Working...
          X