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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      152 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      305 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X