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

Does Print() works on live strategy?

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

    Does Print() works on live strategy?

    Hi NT support,

    I have a strategy that has some Print()s in it for external monitoring.
    In the backtesting the prints where fine but when 'm running live on real-time data I don't get any prints int output window.
    What can cause this?

    TX!

    #2
    Hi freewind, yes the Prints() should work in realtime as well - are you 100% the conditions are triggering the prints at all, the result you see would be normally an indication to look into your code and debug what evaluates differently on realtime data.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      The only condition is the OnBarClose triggered for daily close.
      In backtesting it triggered correctly but on real time strategy there is NO output print when the bar is close.

      Comment


        #4
        Which NT7 version are you using here and which session templates are applied to the chart where the strategy is run from? The bars in NT are handled event based and not time based, so the daily bar closes when the new one opens and not at the current days close.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          NT7 version 6.
          I'm working with Futures,1440 minute bars and CME ETH session.

          Comment


            #6
            Hello,

            Are you sure that you enabled the strategy if running on a chart. Right click->strategies->enabled= true.

            Are there any errors in the log tab in the control center?

            If not let me know.

            Comment


              #7
              Of course I enabled the strategy and look for erros in the log.It is not my first strategy that running.
              I'll wait for the end of the session tonight to monitor it again and I hope I could better understand the problem.

              Comment


                #8
                Hi Brett,

                I think I understood the problem, I have the bar close at 16:15 EST instead of 15:55EST.
                I'm trying to achieve this by using 1440 minute bars(I'm trading CME futures) and a session that ends in 15:55EST and I want the calculation to be done at this time and then if I have an entry signal I want to enter before the close.
                How can I do it?
                BTW in the backtest when I look at the entry time I see 15:55EST but apparently in real-time it doesn't work this way.
                Looking forward for your support.
                Tx in advance!

                Comment


                  #9
                  freewind, you would then need to run the strategy calcs with COBC = false and submit your order at your desired time, you basically check for the time and bars update from the 1440 min series and then submit the order if the conditions triggers based on the data seen at this point.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NRITV, Today, 01:15 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post NRITV
                  by NRITV
                   
                  Started by quantismo, Yesterday, 05:13 PM
                  2 responses
                  16 views
                  0 likes
                  Last Post quantismo  
                  Started by maybeimnotrader, Yesterday, 05:46 PM
                  4 responses
                  24 views
                  0 likes
                  Last Post maybeimnotrader  
                  Started by frankthearm, Today, 09:08 AM
                  6 responses
                  26 views
                  0 likes
                  Last Post frankthearm  
                  Started by adeelshahzad, Today, 03:54 AM
                  5 responses
                  33 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Working...
                  X