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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            160 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            308 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X