Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest-specific override method?

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

    Backtest-specific override method?

    Dear Ninja Trader,

    I'm relatively new to NT7 so this question might have been answered before:

    Is there any override method that can be called ONLY during a backtest process?

    e.g. I'm writing a FX strategy. Since contract sizes are different in simulation and a live brokerage, I want to write a fail safe code that determines if it is running in reality or backtest and therefore sets a correction factor for the contract size accordingly.

    Thanks in advance.

    #2
    Hello Arian,

    Thank you for your note.

    You can use the property Historical to check if the script is running on historical data or real-time data.

    http://www.ninjatrader.com/support/h...historical.htm
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    46 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X