Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Intraday Testing

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

    Intraday Testing

    Hello,

    I'm still working with NinjaTrader and *think* I've figured out how to get it to mimic the statistical breakdown I was using in R and Matlab, however I've found a hole in my theory...

    When testing over 5 days on 1 minute bars, the problem I'm now having is that the previous day's closing bars are being used to calculate the opening signals for the next day. The reason I'm trading strictly within day is because the stocks I'm trading gap up/down dramatically. Thus this gives me an incredibly false signal for the first XX minutes, until there are enough bars from the trading day to remove all bars from the previous day.

    Exit on Close works wonderfully to close out my trades before/at the end of the trading day. How do I now get the system to reset the data series at each open? The only idea I've come up with so far is to create a fake Trading Hours framework which doesn't kick in until into the trading the day, which is a real hack and hard to modify as part of optimization.

    What else can I do to use the fresh data from the day and not the previous days?

    #2
    khoga,

    You could reinitialize your DataSeries object if you want it to reset it totally. There is a DataSeries.Dispose() method that frees up resources, but you must reinitialize the dataseries afterwards otherwise it will probably throw an exception.

    There is also a way to check for "FirstTickOfBar"

    if (FirstTickOfBar)
    {
    //do something
    }

    If you make a multi-timeframe strategy you could check if its the first tick of an added daily time series using :

    if (FirstTickOfBar && BarsInProgress == 1)
    {
    //do something
    }



    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    69 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    42 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    24 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    27 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    54 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X