Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to call time in ninjascript?

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

    #16

    does that mean you have written a psudocode on what you intend to use for the strategy already. But ,'public and private' In NT8,

    these are classes like functions. where private can be accessible to the user to change variable values. example '

    private int EnterNumber = 8; This is written between the private class x :strategy ' (user can change '8' to another number' and


    protected override void OnsSateChange(){}'' 'the public int x {get set} for example is located within User Name defined parameters(user cannot change this section of code).

    //---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Before all this ,you may have start from the very beginning by learning some basic C# language and then using the Strategy builder in Ninjatrader 7 or 8. video.
    1 Videos on Ninjatrader via YouTube line example NinjaTrader 8 - Strategy Builder Overview and more link : https://www.youtube.com/watch?v=HCyt90GAs9k&feature=emb_rel_pause.

    2.https://ninjatrader.com/support/help...gy_builder.htm

    3.https://ninjatrader.com/support/help...ials.htm-Basic Programming Concepts in Educational Resources.
    C# course : link http://li153-236.members.linode.com/...harp/index.php from the NT7 help guide

    4.https://ninjatrader.com/support/helpGuides/nt8/en-us/ and https://ninjatrader.com/support/help..._reference.htm , the topics on the left. But the more knowledge to enable you create advanced topics which are not used daily..
    Last edited by Emma1; 06-18-2020, 06:50 PM.

    Comment


      #17
      Example, NinjaScript Editor 401, NT8 (You Tube).

      private SMA SMA1; is between Strategy{}


      and OnStateChange(){} .


      Beneath OnStateChange()

      , FastPeriod=7;

      And in one of The states() is else if(State==State.Dataloaded)
      {
      SMA1= SMA(Close.ToIn32.FastPeriod));

      }
      Last edited by Emma1; 06-18-2020, 07:19 PM.

      Comment

      Latest Posts

      Collapse

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