Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

State.SetDefaults: NT8 Native list?

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

    State.SetDefaults: NT8 Native list?

    Hi there,

    I was exploring the strategy wizard in NT8 this evening, and State.SetDefaults looked like this at the end of it:

    Code:
    protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    				Description									= @"Trying this out...";
    				Name										= "SampleStrat";
    				Calculate									= Calculate.OnBarClose;
    				EntriesPerDirection							= 1;
    				EntryHandling								= EntryHandling.AllEntries;
    				IsExitOnSessionCloseStrategy				= true;
    				ExitOnSessionCloseSeconds					= 60;
    				IsFillLimitOnTouch							= false;
    				MaximumBarsLookBack							= MaximumBarsLookBack.TwoHundredFiftySix;
    				OrderFillResolution							= OrderFillResolution.Standard;
    				Slippage									= 0;
    				StartBehavior								= StartBehavior.WaitUntilFlat;
    				TimeInForce									= TimeInForce.Gtc;
    				TraceOrders									= false;
    				RealtimeErrorHandling						= RealtimeErrorHandling.StopCancelClose;
    				StopTargetHandling							= StopTargetHandling.PerEntryExecution;
    				BarsRequiredToTrade							= 10;
    			}
    			else if (State == State.Configure)
    			{
    			}
    		}
    After looking at this and browsing some forum threads/help guide, I'm wondering if there's a list of NT8 native settings that go in this space. Things like 'BarsRequiredToTrade' and 'ExitOnSessionCloseSeconds'. Since I work straight on the code, I'd prefer to know the entire sandbox.

    Is there such a reference, or is it a matter of exploring different categories above and seeing what those options are?

    I will say that... one of the infuriating and frustrating things about working with NT7 was the Help Guide having really cryptic, incomplete code samples and references. The NT8 guide is much better, but I'd still like to see some depth on configurable options like this.

    Thanks in advance for any help you can give.

    Yours,
    Spider

    #2
    Hello,

    Thank you for the post.

    The help guide does have a high-level overview of each different type, for example, Strategy : https://ninjatrader.com/support/help...s/strategy.htm

    Clicking on the Name of the type from the help guides left toolbar should produce a page like the one linked above listing most common inherited properties and methods for that type. This is a high-level overview, as you can see on the left toolbar there are still other areas under Strategy that can be expanded like Order Methods.

    Generally, we suggest that you explore the help guide as NinjaScript works a little different than just a programming language. This is the best way to learn how the various tools and parts of the platform can be controlled by NinjaScript and how they all work together. We do try to offer a large number of samples in various formats so each user can learn in their own comfort but there are still concepts which you may need to sit down and read to fully process.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse! Exactly what I was looking for.

      And I understand re: exploring the Help Guide. I've been writing with NT for a while, but it's just the transition to the new environment that I'm catching up with. Appreciate your time.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      64 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X