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

Create an indicator without the wizard

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

    Create an indicator without the wizard

    Hello,
    is there a way to create an indicator without the wizard?
    I mean :
    - open an existing source (.cs) file in visual C.
    -open the NT editor and copy the visual C text in the NT editor.
    - then compile it.
    If yes, how can i open the NT editor with a blank page ?

    #2
    mate41, opening it up with a blank page is not possible unfortunately, you would either start with the wizard and then blank the source out to copy another one in or you could open an existing script, save under a new new name and then proceed from there.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,
      it does not work, to many compile errors. Mostly about the new indicator name.
      I proceeded as follows:
      - open the source file decompressed from the .zip.
      - opened the file in visual C and copy the code
      - new ninja script followed the wizard
      - editor opened; deleted all what's in
      - replaced with the copy from the visual C code.
      - corrected the name everywhere in the code
      - compile.
      No luck still errors about the indicator name.

      Comment


        #4
        Can you perhaps attach the script you attempted to compile?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,
          here it is.
          Attached Files

          Comment


            #6
            I'm not sure I follow what you expected to see from this code sample, vital sections of the code are missing here, for example your Initialize() or OnBarUpdate()?

            It appears you just copied in the NT wizard generated code section?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Originally posted by mate41 View Post
              Bertrand,
              it does not work, to many compile errors. Mostly about the new indicator name.
              I proceeded as follows:
              - open the source file decompressed from the .zip.
              - opened the file in visual C and copy the code
              - new ninja script followed the wizard
              - editor opened; deleted all what's in
              - replaced with the copy from the visual C code.
              - corrected the name everywhere in the code
              - compile.
              No luck still errors about the indicator name.
              That is not quite the way to do it; there is a much simpler and near foolproof way to do it.
              1. Open any existing indicator in the editor
              2. Right-click in the editor, and "Save As ..." a new name
              3. Remove any sections of code you do not want, and use your own. This means that you can delete all the code text under every section/method if you want.

              Actually, I do it all the time. I cannot remember the last time that I used the wizard. Though as at now, I just use an indicator that I did as such as a template (the indicator that I open before doing the "Save As .." pavane). i.e., I have an indicator where all sections are blank, that I use for a template.

              Comment


                #8
                Thanks koganam,
                but the indicator is not visible ! Tools/Edit ninjascript/here the indicator isn't visible.
                Strange ?

                Comment


                  #9
                  Originally posted by mate41 View Post
                  Thanks koganam,
                  but the indicator is not visible ! Tools/Edit ninjascript/here the indicator isn't visible.
                  Strange ?
                  What indicator is not visible? None of them?

                  Comment


                    #10
                    Originally posted by mate41 View Post
                    Bertrand,
                    here it is.
                    Hi koganam,
                    this one, see below in the thread. This is an indicator i exported wrong and can't no more extract my source code and recompile it.
                    Don't import him you couldn't delete it anymore.

                    Comment


                      #11
                      Hi mate41,

                      You need to delete that file. If you can't delete using Tools > Edit NinjaScript screen, then try manually deleting the file from your hard drive, stored in Documents\NinjaTrader 7\bin\custom

                      It may be saved to one of the subfolders there: Market Analyzer, Indicator, Strategy

                      Do this after a fresh restart so you can make sure NT doesn't access at same time. If you're having any trouble cleaning up this file, please send a note to support 'at' ninjatrader 'dot' com. Reference this thread, include your phone number and availability so we can assist via remote.
                      Ryan M.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by pvincent, 06-23-2022, 12:53 PM
                      14 responses
                      238 views
                      0 likes
                      Last Post Nyman
                      by Nyman
                       
                      Started by TraderG23, 12-08-2023, 07:56 AM
                      9 responses
                      383 views
                      1 like
                      Last Post Gavini
                      by Gavini
                       
                      Started by oviejo, Today, 12:28 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post oviejo
                      by oviejo
                       
                      Started by pechtri, 06-22-2023, 02:31 AM
                      10 responses
                      125 views
                      0 likes
                      Last Post Leeroy_Jenkins  
                      Started by judysamnt7, 03-13-2023, 09:11 AM
                      4 responses
                      59 views
                      0 likes
                      Last Post DynamicTest  
                      Working...
                      X