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

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 :

    BertrandNinjaTrader Customer Service

    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.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by andrewtrades, Today, 04:57 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              6 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              436 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              9 views
              0 likes
              Last Post FAQtrader  
              Started by rocketman7, Today, 09:41 AM
              5 responses
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X