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

Strategy analyser EOD data are one day delayed

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

  • NinjaTrader_ChrisL
    replied
    Hello Petr,

    Thanks for the reply.

    You will see the 29th print when using Calculate.OnEachTick. Make sure to turn on Tick Replay to make this work.

    Please let me know if I can assist further.

    Leave a comment:


  • Unlimited
    replied
    Hi Chris,

    and what about Calculate.OnEachTick instead of Calculate.OnBarClose? Will solve my problem, do not think so?

    Because I have found related thread:
    https://ninjatrader.com/support/foru...ad.php?t=84696

    Regards,
    Petr.

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello Petr,

    Thank you for the reply.

    The OnBarUpdate for a script will be called at the beginning of the next bar if the Calculate mode is set to OnBarClose. With the Kinetick EOD connection, we do not have a bar for today, yet. Since the bar for today has not technically opened for the EOD connection yet, we do not have an OnBarUpdate event for the 29th yet. There is no alternative method to OnBarUpdate. You will see the print for the 29th when today's bar closes, and you will not see the Print for today at that time either.

    Please let me know if I can assist further.

    Leave a comment:


  • Unlimited
    replied
    Hello Chris again,

    I am sorry, I do not understand you at all. It is not only about SA. If I apply strategy in the chart then yesterday is not taken to account? Why?

    I understand that today data are not there, that is ok, we do not know close of today. But why strategy can't works with yesterday close as far as I am able to see it on the chart?

    If I can't use OnBarUpdate() method to get yesterday OHLC bar data, which method should I call instead?

    Thank you in advance for your advice.

    Regards,
    Petr.

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello Unlimited,

    Thank you for the reply.

    The OnBarUpdate for the August 29th bar will not be called until the close of today's bar because the SA is not including the data for today, so the OnBarUpdate has not processed for yesterday. You will see the 29th printed when today's bar closes.

    Please let me know if I can assist further.

    Leave a comment:


  • Unlimited
    replied
    Hello Chris,
    thank you for fast response. The parameters of test are follow:
    - I am connected on Kinetic EOD
    - Tested ticker is SO
    - SA settings see attachement, nothing special teher I would say.
    How did you recognize that your MA strategy was calculated up to 29th included?

    I have tested it like this:
    Code:
    protected override void OnBarUpdate()
    {
         if (BarsInProgress != 0) 
              return;
    
         if (CurrentBars[0] < 1)
              return;
    
         if (CurrentBar < BarsRequiredToTrade)
              return;
    			
         Print("BarTime="+Time[0].ToString("dd/MM/yy"));
    And the latest output is:
    ...
    BarTime=27. 08. 18
    BarTime=28. 08. 18

    but the yesterday bar from 29.08.2018 is missing.

    Regards,
    Petr (Unlimited)
    Attached Files

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hello, Unlimited.

    Thank you for the post, and welcome to the NinjaTrader forum.

    What data feed are you connected to? I am able to run the MA Crossover strategy on the Kinetick EOD connection up to the 29th (yesterday). This was tested on the MSFT stock with the default session template.

    Could you please also post a screenshot of how your Strategy Analyzer is configured?

    I look forward to assisting further.

    Leave a comment:


  • Unlimited
    replied
    Additionally I would say that method OnBarUpdate() is not called for latest bar, but latest only for bar -1 day.

    Leave a comment:


  • Unlimited
    started a topic Strategy analyser EOD data are one day delayed

    Strategy analyser EOD data are one day delayed

    Hello, I would like to use strategy analyser for EOD data, but data set is different against chart. E.g. today 2018-08-30 before US market is open I can see in chart of any stocks e.g. AAPL yesterday OHLC - from 2018-08-29.
    But Strategy Analyser use dataset only until 2018-08-28 and not until 29th. Why? Is there any reason to delay EOD data for SA?

Latest Posts

Collapse

Topics Statistics Last Post
Started by Waxavi, 04-19-2024, 02:10 AM
3 responses
41 views
0 likes
Last Post gaz0001
by gaz0001
 
Started by Max238, Today, 01:28 AM
2 responses
26 views
0 likes
Last Post NinjaTrader_ChristopherJ  
Started by Shansen, 08-30-2019, 10:18 PM
25 responses
949 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by JonesJoker, 04-22-2024, 12:23 PM
8 responses
42 views
0 likes
Last Post JonesJoker  
Started by timko, Today, 06:45 AM
0 responses
6 views
0 likes
Last Post timko
by timko
 
Working...
X