Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy start another strategy

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

    Strategy start another strategy

    Say your conditions are met and you'd like to start a new strategy, for whatever reason.

    I know you can disable a currently running strategy; take for instance you have two strategies called SimpleMA and ComplicatedMA and you want to disable complicated from simple.

    Code:
    Account.Strategies[i].Disable(); //i is the index in the StrategiesCollection of your ComplicatedMA strategy
    My current code looks like the following:

    Code:
    Period test = new Period(PeriodType.Minute,1,MarketDataType.Last);
    							DoNothing nts = new DoNothing();
    							nts.Account = Acct;
    							nts.SetBarsPeriodInstrument(test,position.Instrument);
    							Acct.Strategies.Add(nts);
    							InstrumentDictionary.Add(position.Instrument.FullName,Acct.Strategies.Count-1);
    							InstrumentNames.Add(position.Instrument.FullName);
    Now that disables the strategy, but there is no corresponding Enable(); or Start(); or Initialize(); function to start it, from what I can tell anyway.

    Is there anyway I can do such a thing? Maybe something I'm missing?

    #2
    Hello zwentz,

    Unfortunately there isn't a supported method for starting strategies programatically. Strategies must be enabled by setting enabled to true from chart GUI, or checking the box in the control center.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X