Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Convert C# file to NinjaScript C#

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

    Convert C# file to NinjaScript C#

    Hi,

    I have a C# file from another software but I am having a ton of error codes when I try to write up the code in NinjaScript. There are some areas that NinjaScript does not have. Can someone please take a look and inform me on how to get it to compile in NinjaScript? My programming skills are unfortunately terrible. I wish NinjaScript had an easer language.

    Thanks.
    Attached Files

    #2
    Welcome to our forums olobay, we unfortunately could not convert this custom code over to NinjaScript for you - however we do have a broad range of tutorials available to get you started in this area:



    You can also consult the NinjaScript language reference if you press F1 in the software and then go to the NinjaScript section here.

    If you like to get this converted by a professional programmer, please contact any of these certified NinjaScript consultants from this link :

    Comment


      #3
      Okay so I am trying to write my own indicator using another indicator as a guide. I tried to compile but I get an error. Can anyone help? I can't export the script so far because there are errors but I have copied and pasted the code into a text file.
      Attached Files

      Comment


        #4
        Originally posted by olobay View Post
        Okay so I am trying to write my own indicator using another indicator as a guide. I tried to compile but I get an error. Can anyone help? I can't export the script so far because there are errors but I have copied and pasted the code into a text file.
        NT ships with a StochRSI. How is this any different? It seems to me that it would be a better idea to just start from the shipping indicator and modify it as you see fit? The existing indicator would have many lessons on how to code what you want to do.

        Just my $0.02 worth.

        Comment


          #5
          Hi oloboy,

          I got a few different errors, and when I fixed one more came up. Unfortunately, we will not be able to debug this for you. I see you are working with data series, so it may be better for you to delete this script and start a new one. Start simple at first. Work with one data series and get the usage right before adding additional complexity

          For help with DataSeries, please see this post:


          For general syntax help, the strategy wizard can help build expressions and view the resulting code for these. The expressions in strategy wizard are built with a point and click interface:
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            The StochRSI that ships with NT does not have an input for LBLen nor WAvgLen. It does not plot as smoothly as the StochRSI on my other platform so that's why I am trying to code it for NT.

            Comment


              #7
              olobay, have you already tried just running the default StRSI through NT's WMA?

              Value.Set(WMA(StochRSI(10), 7)[0]);

              That snippet above would smooth the StRSI with a WMA having a signal lag of 2 bars for example.

              Comment

              Latest Posts

              Collapse

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