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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      81 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      149 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      79 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      52 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      59 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X