<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Add On >


Previous page Return to chapter overview Next page

AtmStrategy contains properties and methods used to manage ATM Strategies. When working with an AtmStrategySelector, selected objects can be case to AtmStrategy to obtain or change their properties.



1. For a complete, working example of this class in use, download framework example located on our Developing AddOns Overview

2. For more information on working with the ATM strategies programmatically in general, please see the Using ATM Strategies section.





// Using AtmStrategy to handle user selections in an ATM Strategy Selector
myAtmStrategySelector.SelectionChanged += (o, args) =>
  if (myAtmStrategySelector.SelectedItem == null)
  if (args.AddedItems.Count > 0)
      // Change the selected TIF in a TIF selector based on what is selected in the ATM Strategy Selector
      NinjaTrader.NinjaScript.AtmStrategy selectedAtmStrategy = args.AddedItems[0] as NinjaTrader.NinjaScript.AtmStrategy;
      if (selectedAtmStrategy != null)
          myTifSelector.SelectedTif = selectedAtmStrategy.TimeInForce;