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

How to print only at the last bar

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

    How to print only at the last bar

    I'm using the Print function to print some variables, but I'm really interested just at the value of those variables at the last bar.
    How can I do something like:
    if (LastBar)
    Print (etc)

    Thanks

    #2
    stefy, unfortunately you would need to custom code this with storing barnumbers to a variable and then comparing to the CurrentBar.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Is there a way to call programmatically the last day of backtest?

      Comment


        #4
        No, but you can add an input where you enter the last day of your backtest then access this in your script.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        6 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        167 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        8 views
        0 likes
        Last Post cre8able  
        Started by RichStudent, Today, 04:21 PM
        0 responses
        5 views
        0 likes
        Last Post RichStudent  
        Working...
        X