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

EOD vs Non-EOD strange Analyzer results

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

    EOD vs Non-EOD strange Analyzer results

    Hello,

    I might be missing something obvious but when i run my strategy on 4hourly charts with or with out break EOD these are the results. anaysis filters for both runs is set on net profit, half hourly, Entry Time:

    4 hourly with break at EOD: you can see it enters trades every 4 hours. due to daylight savings, the trading hour shifts by one slot.
    Click image for larger version

Name:	image.png
Views:	135
Size:	231.4 KB
ID:	1274792
    4 hourly with out Break at EOD, seems to enter trades every single half hour of the day? how is this possible? Since we have 24 hours per day everyday of the year, shouldn't it only trade 4 hour intervals as well??
    Click image for larger version

Name:	image.png
Views:	111
Size:	291.8 KB
ID:	1274794

    how is that possible?
    ​thanks
    Attached Files

    #2
    Hello moewqasem,

    You would need to look at the executions that each test produced to better understand the results that you can observe in the other tabs. Changing the break at eod setting should change the executions due to the underlying data being changed. That will change how logic executes in the test and the executions will differ. The frequency of trading would be determined by the dataseries being used in combination with how the conditions to trade evaluated in the test.


    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse thanks for reply but i dont think you addressed/understood my question. I’m not asking about results or frequency of trades, i know this will change depending on the change in the candle timing/ shape.
      The question i asked is if Break EOD is unchecked, there should be 6 240min candles per day only.. this is what im using. These are closing at specific times and that would be 4am/8am/12am/4pm/8pm/12am. Since my strategy is calculating on “on bar close” only i should only see trades entering at these times.
      There is no halfs here or 30mins and even if there is.. there should be untraded gaps between the 4 hour candles.. in no scenario should i see entries on any half hour as i saw in the above result. When i check break EOD it behaves as expected and you can see trading gaps while 4 hour candle is forming gmind you when Break EOD is checked i saw on subsequent hours trade entries because market hours shift with daylight saving and thats correct) But when unchecked there are trades entering every 30mins? This leads ne to believe that left unchecked ninjatrader is skipping candles or randomizing the timing of the 240min candles open and close every day.. some kind of error.
      What can be the explanation for this otherwise? See my prior post again pls

      Thank you ​

      Comment


        #4
        Hello moewqasem,

        You would need to look at the executions​ in that test to know why the results are being displayed in that way. The given information is not enough to know why the report looks that way, the report is based on the executions and their times so that would be relevant to the question. If unchecking the option changes how the strategy logic executes that would also change the executions which would change the results in that view. You would need to look at the executions timestamps to get a better idea of what happened.


        JesseNinjaTrader Customer Service

        Comment


          #5
          Hello Jesse,

          I'm attaching both Executions, and as you can see, when Break at EOD is unchecked executions are executed at all times of the day, literally. even though it is a 240 minutes chart, why is that happening??

          also, is there a rule of thumb when it comes to ES futures on whether to use break at EOD or not ?

          Click image for larger version

Name:	Screenshot 2023-10-26 203004.jpg
Views:	107
Size:	458.8 KB
ID:	1274883Click image for larger version

Name:	Screenshot 2023-10-26 201335.jpg
Views:	102
Size:	310.9 KB
ID:	1274884

          Comment


            #6
            Hello moewqasem,

            To clarify in your images you are not in the execution view, in the dropdown list you can access the executions view which shows the individual entry and exit orders along with their timestamps.

            In the first image in the analysis view you are using trade exit times for the report. Do you see the expected result if you change that to entry times?

            The second image you have is using entry times for the graph which is why you see the more uniform report. If your logic is being executed on bar close you should see entry times that correspond to the 240 minute series.

            Exit times will vary because you are using high order fill resolution with a value of 1 minute.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Dear Jesse,
              Ignore my last post i missread the request and missclicked exits instead of entries (in the original post the results I showed were based on entries).

              See here are executions when i run it with Break EOD off and sorted by time first and by entry next:



              - from 2008-20015 for a while it seems to enter trades as expected only on the 4 hour mutltiples (bottom half of below picture) but only for periods of time.
              - although these are not the expected 4am/8am/12am/4pm/8pm/12am candle closing times.
              - then it shifts onwards it shifts to multiples of 15mins and random hours.

              Click image for larger version

Name:	image.png
Views:	120
Size:	404.0 KB
ID:	1275002

              -See here from the run in 2015 i highlight few days apart entries that happened with 1 hour gap how is that possible if I am running the same 240min candles?
              Click image for larger version

Name:	image.png
Views:	95
Size:	415.7 KB
ID:	1275003

              w

              Comment


                #8
                Hello moewqasem,

                One note here is that you are using high order fill resolution with a period of 1 minute. Depending on when your 1 minute data ends that may be causing the result you are seeing. I would suggest to further simplify the test and disable high order fill resolution so you are using only the primary series for fills.

                ​​​​​​​
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Hi Jesse,

                  Ok so the issue is that trades are entering every half hour, when there should be 4 hour gaps and this happens when "Beak at EOD" is unchecked.
                  It is not a matter of minutes, but hours, so high or low order fill resolution should not be the issue. I have tested this anyway and can confirm it is not causing the issue, see these 2 screen shots:


                  Standard 4hourly candle with standard fill res and with High fill res entering trades every half hour:

                  Click image for larger version  Name:	Standard order fill.jpg Views:	0 Size:	368.4 KB ID:	1275393
                  Click image for larger version

Name:	image.png
Views:	74
Size:	611.6 KB
ID:	1275398​​



                  I think I found the what is causing the issue,

                  Surprisingly changing the "trading hours" setting seems to fix the issue:



                  -Break EOD: unchecked
                  -Trading hours: "use instrument settings"
                  = Trading every half hour:
                  Click image for larger version

Name:	image.png
Views:	79
Size:	611.6 KB
ID:	1275399?​


                  -Break EOD: unchecked
                  -Trading hours: "Default 24 x 7"
                  = Trading as expected every 4 hours only except for (1-3 AM due to daylight saving).​

                  Click image for larger version

Name:	image.png
Views:	80
Size:	510.4 KB
ID:	1275400


                  I can conclude that using the built in templates for instrument hours (i never changed them these are default from NT8) are causing issues?
                  Unless something i dont understand here that is causing real market times to shift by 30 minutes?

                  Thanks
                  Attached Files
                  Last edited by moewqasem; 10-30-2023, 04:26 AM.

                  Comment


                    #10
                    Hello moewqasem,

                    If you uncheck break at eod that will change where the executions are placed and also the amount of executions so comparing the two tests that you are will inherently produce different results. The results view you are looking at is based on the executions from the test so seeing differences in that report would be expected by toggling break at eod. Toggling break at eod will allow indicators to work differently and calculate differently leading to different points where executions are placed and may result in the strategy performing very differently. The easiest way to see this is by using the chart view of the backtest. In regard to the trading hours, If using default 24/7 works for your strategy and aligns with your testing you can use that. You can otherwise use the built in templates or custom templates that you make to control trading hours in the test.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Hi Jesse,
                      ok you didn't address the issue. But I will not explain again or pursue further.

                      Thank you for your efforts,

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Graci117, Yesterday, 11:40 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post Graci117  
                      Started by BIOK.NT, Yesterday, 01:56 PM
                      2 responses
                      11 views
                      0 likes
                      Last Post BIOK.NT
                      by BIOK.NT
                       
                      Started by i2ogu3, Yesterday, 11:31 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post i2ogu3
                      by i2ogu3
                       
                      Started by RDTrader16, Yesterday, 10:19 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post RDTrader16  
                      Started by gemify, 03-08-2023, 08:02 AM
                      9 responses
                      150 views
                      0 likes
                      Last Post culpepper  
                      Working...
                      X