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

Add (PeriodType.Second, 60)

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

    Add (PeriodType.Second, 60)

    I have a multi-timeframe strategy and has been running it through the backtesting on a data that I have locally on my PC. All my timeframes are PeriodType.Minute based. When running through backtesting I have plenty of signals from the strategy.
    Now I decided to change type of one of the bars into PreiodType.Second. I made equivalent change: changed 3 minute time-frame to 180 second time frame and attempted to run strategy.
    Add(PeriodType.Minute, 3); ==>Add(PeriodType.Second, 180);
    I got no signals. It was weird and I started debugging it and found out that strategy never entered even onStartUp method (and onBarUpdate as well).
    So my logical question would be: Does platform aggregate PeriodType.Second based bars, when strategy is run through backtesting? Because now I would conclude that it doesn't. This might make sense when I put 30 seconds to period, because I don't have 30 seconds bars in my historical data(I have only 1 minute based data), but why wouldn't it work for 180 seconds bar?
    I would like you to at least confirm my assumption regarding why it does not work.
    Thanks

    #2
    Hello Andreano,

    Thank you for your post.

    Seconds data is based on the underlying data of tick. You will need tick data to run seconds data.

    For information on underlying data for each bar type please visit the following link: http://www.ninjatrader.com/support/h..._are_built.htm

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Richozzy38, Yesterday, 01:06 PM
    4 responses
    21 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by KonAdams, 05-07-2024, 10:53 PM
    2 responses
    16 views
    0 likes
    Last Post KonAdams  
    Started by Patlpp, 08-16-2021, 03:10 PM
    11 responses
    505 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by DawnTreader, Yesterday, 05:58 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by ntram, Yesterday, 05:39 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X