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 not calculates on a new day data

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

    strategy not calculates on a new day data

    Hi

    I leave the strategy ON from yesterday.
    when the trade day opens and data starts to flow, the strategy doesn't do anything,
    it doesn't sense it to be a new day. Even after I enable or disable.
    I even open the MS Visual Studio and try to catch the last TICK bar of the previous day.
    AND although there are already bars on the chart it goes to the mode of real time waiting for new data. I mean on the last TICK of previous day it begins to wait although there is data flowing..

    Historical data processing is working OK.
    if I remove the strategy and load as new, it works. it loads the data and start its logic.

    any suggestions ?

    #2
    Hello dadarara,

    Thank you for the post.

    I would not have enough details at this point to form an accurate analysis of what is happening but I can comment on what you have provided so far.

    Based on the strategy no longer working after a new day or disabling and re-enabling I would likely suggest testing a different script that has no trading logic and instead has Prints. This would just verify that your data is working in the situation you want and would highlight if some logic you used is partially at fault.

    This would be advisable to test using market replay, if you can reproduce this in that mode you could test more than once per day to isolate the problem.

    When you re-enable the script is it in a yellow or green state in the control center?



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse

      please allow me to explain why I think using the PRINT statements doesn't help much.
      I used the debugging mode of my strategy and connected the MS Visual Studio to trace the logic.
      I have triggered a breakpoints exactly on the last TICK of the previous day and from there forward controlled the run of the strategy step by step. What I see, is that the strategy breaks OUT of the OnBarUpdate() as it doesn't see any new TICK in the data stream. and goes to OnStateChange().

      from that moment on, my strategy internal logic is not involved. the system just sits and waits for the data.

      BUT !!! there is data !!! I see the TICKs on the chart !! I see the chart moving along...the trading is ON. I dont know how else I can explain that I see the NINJA as stuck in the "past end of day".

      Only if I stop the strategy run, and remove it altogether from the chart, and afterwords attache it anew, only then it starts to work correctly. Bypassing the end of day and beginning of the new one ( Bars.IsFirstBarOfSession = true)

      what can I try next please?

      Comment


        #4
        any thoughts please ?

        Comment


          #5
          Hello dadarara,

          Thank you for the reply.

          In this situation I would still stand by my last post, you would need to reduce the situation further to identify the issue.

          Have you at this point tried testing a totally different script in the same use case, Does that work?

          If something is not working, we would need to first understand a baseline of where everything has stopped working. If other scripts that do not contain the same logic work, we can deduce that this is isolated to something that the logic of the non-working script is doing.

          If the other script does not work, we could look at general configuration items such as are the chart and strategy using the same session hours along with other platform related items.

          Testing the SampleMACrossOver would be one simple test but you can certainly form your own test that includes more targeted Prints to know what the scripts is seeing. The reason the Prints are important is you can easily attach that test for others to confirm the results where visual studio is unlikely that we can set up the exact same test.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by funk10101, Today, 12:02 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X