Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print function

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

    Print function

    Hello,

    I have a question about the Print function in NT. Let's say I create these variables:
    -entry for the entry price.
    -exit for the exit price
    -stop fot the stop loss

    It would be something like:

    Print(entry+";"+exit+";"+stop);

    When doing a backtest, will I have this information in the Output window? If yes, which steps should I do? Just do the backtest and then go to the output window to see if the information is there?

    Thanks

    Sincerely

    #2
    Hello,

    Yes, the Print() function will work during backtesting. You do not need to do anything different than if the strategy was running against the live market.

    Calling Print() in a backtest will print this information to the Output window
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thank you for the quick reply, I am a little confused, I mean when I test a strategy for example in a 10 years period, and I go to Strategy < Backtest.

      Then I wait for the results and finally I go to the Output Window for getting the informaton of the Print function. Is that right?

      Thanks

      Sincerely

      Comment


        #4
        Yes, the results will be displayed on the output window as the back test runs. You may want to try adding some Time[0] prints to get clarification on how this is working.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Yes, that would be perfect, so I could check the day and time and see if it is doing the calculations correctly.

          Can you give me an example of a Time(0) prints? so I could know the day and time or just the day.

          Thanks

          Sincerely

          Comment


            #6
            Hello,

            You can Print the time just by using:

            Print(Time[0]);
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            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
            17 views
            0 likes
            Last Post RookieTrader  
            Started by PaulMohn, Today, 12:36 PM
            0 responses
            2 views
            0 likes
            Last Post PaulMohn  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            38 views
            0 likes
            Last Post love2code2trade  
            Started by junkone, Today, 11:37 AM
            3 responses
            22 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X