Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalcOnBarClose not affect

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

    CalcOnBarClose not affect

    I write testing sample:
    Code:
    protected override void Initialize()
    {
      Add(PeriodType.Minute, 15);
      CalculateOnBarClose = false; // not affected?!
    }
    
    protected override void OnBarUpdate()
    {
                    if (BarsInProgress==0)
                    {
                        Print("M1: "+Time[0]);
                    }
                    else if (BarsInProgress==1)
                    {
                        Print("M15: "+Time[0]); // or Times[1][0] - no difference
                    }
    }
    In Output window I expected to see time of ticks, but I see the following:
    M1: 07.03.2012 8:15:00
    M15: 07.03.2012 8:15:00
    M1: 07.03.2012 8:16:00
    M1: 07.03.2012 8:17:00
    M1: 07.03.2012 8:18:00
    M1: 07.03.2012 8:19:00
    etc.

    Why?
    Privider is CQG, demo-account.NT 7.0.1000.9
    Last edited by romanick; 03-12-2012, 12:11 AM. Reason: invalid method name in subj

    #2
    Welcome to our forums romanick - the COBC property would only be effective in realtime time / Market Replay use, but not on historical data / backtesting : in this case it would be 'true' per default, you would have access to the OHLCV info from the worked with bar series.

    Comment


      #3
      Thanks for your reply!

      Comment


        #4
        How can I use MarketReply data in StrategyAnalyzer?

        Comment


          #5
          You're welcome - unfortunately you could not use MR data in the Strategy Analyzer backtesting engine, you could run a Market Replay for example for a month continuously though if you downloaded the needed data via File > Utilities > Download Replay Data.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          84 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          46 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          66 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          69 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          58 views
          0 likes
          Last Post CarlTrading  
          Working...
          X