Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compiling Statistics

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

    Compiling Statistics

    This is not directly related to NinjaTrader but I posting this question to see if the NinjaTrader has any suggestions.

    Suppose I have 2 years worth of 1 minute data on the futures. How would you compile statistics with this data?

    For example:
    1) When an emini future breaks an opening range, how often does it pullback versus continuing the breakout?
    2) How often does the High/Low of the day occur in the first 30 minutes? First 90 minutes? First 135 minutes? Etc.
    3) When the trade breaks the top of the opening range, how often does the day end above the opening range, middle of the opening range, below the opening range?
    4) Etc.

    #2
    - I would write indicators that plotted a value of 1 or 0 for true or false for when the conditions occured and have an internal counter that kept track of each time the condition was seen and print this information the NinjaScript Output window.
    RayNinjaTrader Customer Service

    Comment


      #3
      That's a novel idea, thanks.

      Comment


        #4
        Hi guys,
        I just started messing around with this exact type of stuff too. I've been just writing a strategy that doesn't buy or sell anything, just spits stuff out to the output window. If you look at the example of how to write a text file, that might be an easier way to go but I couldn't get it working in the brief time I tried.
        #2 is pretty easy with something like:
        if (ToTime(Time[0]) >= 90000 && ToTime(Time[0]) <= 100000)
        {

        if(High[0] > Highbar)
        {
        Highbar = High[0];
        }

        }
        ect...then Print(Time[0].ToString()); Print(Highbar);

        Comment


          #5
          You can also take a look at the code in my genetic optimizer (in the misc code samples forum), which writes to a .csv file so you can easily open it in Excel & don't have to worry about overrunning the Output window. This is how I would do it.

          Comment


            #6
            In the interests of lazyness/sharing - Has anyone written anything like this e.g. a script which will output the times of HODs and LODs to excel? Giving something like the following? http://www.traderslaboratory.com/for...nute-3880.html

            Or is there any service/website/software I can use to generate this as (correct me if I'm wrong) I can't get historical intraday data for continuous contract with zen-fire?

            thanks

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            549 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X