Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PeriodType.Day not looking back on intraday chart?

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

    PeriodType.Day not looking back on intraday chart?

    Hi,
    I wonder if you could give some guidance.
    I am running a strategy on a 1min chart in NT7 with
    CalculateOnBarClose = false;
    and use 'FirstTickOfBar' to replicate a bar-close type strategy.I only trade 1 instrument.
    In addition to running the strategy on the 1min chart I have also added the following timeframes:
    Add(PeriodType.Minute, 15);
    Add(PeriodType.Minute, 60);
    Add(PeriodType.Day, 1);

    I have programmed much of my strategy adding in 15min and 60min data/signals but I seem to have a problem with the daily data.
    I have put in a null check as follows ( I require at least 3 days data for the values I would like to calculate using daily data):

    if (CurrentBars[3] < 4 ) return;

    But when I check the value of CurrentBars[3] in the output window, it never gets above zero - ie it appears that despite having 10 days of data loaded on my 1min chart the CurrentBars[3] array is unable to load for whatever reason. (If I remove the daily data, then my strategy works fine across all 10 days using 1min, 15min, 60min barsarrays.)

    Is there a reason why I cannot load daily data on a 1min chart if, for example, 'CalculateOnBarClose = false;'?
    I recall that NT6.5 required barsarrays to be loaded in decreasing size order I think - is something similar causing a problem for my data loading here perhaps?

    Any tips/guidance much appreciated. Many thanks.

    #2
    Pourleau, what BarsRequired are you setting in your strategy properties as you start it up? This # would apply to all series, so also your daily one and if you only load 10 days it would never be satisfied then being on it's default 20 setting.

    Comment


      #3
      Thanks, Bertrand - that was indeed the problem.

      I had set another variable to check days (private int DaysRequired) but this of course is subject to BarsRequired also.
      many thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      580 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      335 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      102 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X