Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,404 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X