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

declaration square root

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

    declaration square root

    hi

    I am new but I want to build an indicator that has a formula enbedded with square roots in it.

    I used sqrt for that but the compiler says that sqrt is not present in the actual context. I think i have to declare that but where and how?

    second question: I want to define the day high and low by myself in gui but how do I do that.

    thx a lot for help

    lg
    ragga

    #2
    To use square roots you would use Math.Sqrt().

    I am not sure what you mean by defining it in GUI. Where would you define it and how would you use it? If you mean parameters for your indicator, you can create these just like any other parameter. Please take a look at the SMA indicator's Period parameter and how it was made. Look at the Variables region and Properties region of the code and pay special attention to what is capitalized and what is not.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Raggamuffin,

      For square info, try here...



      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        RJay,

        C# has a math method already defined for square root.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          thx a lot everything clear

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cre8able, Today, 01:16 PM
          2 responses
          9 views
          0 likes
          Last Post cre8able  
          Started by chbruno, 04-24-2024, 04:10 PM
          3 responses
          48 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by samish18, Today, 01:01 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by WHICKED, Today, 12:56 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by WHICKED, Today, 12:45 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X