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

Print command not executed on Live trading

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

    Print command not executed on Live trading

    Hey,

    I am swing trading an automated strategy in Live account and I have a code, where it prints daily report at the start of the new day (using secondary data series, 1 minute).

    My primary data series is 900 tick. When I load the strategy, it prints daily reports from the past for as long as I have "Days to Load". Yet, this is my 4th day trading this strategy live and zero reports were printed, even though it had to print each morning.

    What can cause the issue? Additional data series? Something else?

    #2
    Hello UltraNIX,

    Without knowing what conditions the print is within it would be impossible to say what may be happening. What I could suggest would be to add more prints outside of the condition where your print currently is, that would let you know how far into your conditions/logic it is executing. Doing that will give you a better idea of what specifically needs checked at which point you could print any variables or other items used in the parent condition.

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

    Comment


      #3
      your code is printing all historical trades...... including ones you didn't take. It simply prints out the ones that your strategy would have taken if it was running.
      to print only real time trades try putting your print statement inside this
      if (State != State.Historical) {
      // your print statement
      }

      Comment


        #4
        it seems that strategy was probably out of sync last week. On Sunday, I restarted NinjaTrader, re-loaded the strategy and today, 2nd day in a row it prints as expected.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rdtdale, Today, 01:02 PM
        0 responses
        1 view
        0 likes
        Last Post rdtdale
        by rdtdale
         
        Started by alifarahani, Today, 09:40 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by RookieTrader, Today, 09:37 AM
        4 responses
        18 views
        0 likes
        Last Post RookieTrader  
        Started by PaulMohn, Today, 12:36 PM
        0 responses
        6 views
        0 likes
        Last Post PaulMohn  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        40 views
        0 likes
        Last Post love2code2trade  
        Working...
        X