NexusFi: Find Your Edge


Home Menu

 





What happens when you call Initialize() within a strategy/code as a method?


Discussion in NinjaTrader

Updated
    1. trending_up 1,589 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 ericson 
Sacramento, CA
 
Experience: Advanced
Platform: NinjaTrader
Broker: NA
Trading: Stocks, Forex
Posts: 64 since Nov 2013
Thanks Given: 14
Thanks Received: 19

The goal is to dynamically add instruments to my strategy by calling Initialize() as a method within my code. So, not the protected override void one, but just initialize() as a method in the code to reload the script to add an instrument.

Has dealt with this or has knowledge of this?

Thanks!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711


Calling Initialize() restarts the backtest so you can't add instruments mid-strategy, at least not by calling Initialize(). I'm not sure how to otherwise.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 28, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts