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 r68cervera, Today, 05:29 AM
    0 responses
    3 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    6 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    35 views
    0 likes
    Last Post JonesJoker  
    Started by GussJ, 03-04-2020, 03:11 PM
    12 responses
    3,241 views
    0 likes
    Last Post Leafcutter  
    Started by AveryFlynn, Today, 04:57 AM
    0 responses
    7 views
    0 likes
    Last Post AveryFlynn  
    Working...
    X