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 compile CS files

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

  • Grantx
    replied
    Found it. Thank you very much indeed Jim.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Grantx,

    All NinjaScripts in source code are compiled into the Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll file. You are not missing a step and just need to know what the name is that you should be looking for.

    If the script compiles, check for the Name as entered for the Name property under OnStateChange > State.SetDefaults. This will be the name listed in the Indicators dialog. Check any subfolders in the Indicators dialog as well.

    If you do not see the indicator listed, please check the log tab of the Control Center for runtime errors and inform the developer.

    If you are stuck here, I may suggest reaching out to the developer of the indicator so they can give you an export of the indicator and let you know what name you should be looking for. You can then import it following the steps linked in post #2.

    If you want to learn more about NinjaScript code, I recommend starting with the Strategy Builder 301 course and NinjaScript Editor 401 course.

    Strategy Builder 301 — https://www.youtube.com/watch?v=HCyt90GAs9k

    NinjaScript Editor 401 — https://www.youtube.com/watch?v=K8v_2ONBbqI

    We look forward to assisting.

    Leave a comment:


  • Grantx
    replied
    the file has a .CS extension and I have copied the text into a new indicator file. I go to the ninjascript editor and select new indicator.
    Then I copy the entire contents into the new script and compile with no errors.
    I name the file. I can see the file in ninjascript but not from the chart.
    I deliberately create an error and the compilation tells me there is an error. When I remove the error it compiles just fine. Where is it compiling to? Am I missing a step?

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Grantx,

    Thanks for your post.

    We recommend using our import/export process to distribute NinjaScripts to be sure that all dependencies are included, to avoid confusion, and to prevent situations where the NinjaTrader Documents folder gets damaged.

    Import - https://ninjatrader.com/support/help...nt8/import.htm

    Export - https://ninjatrader.com/support/help...nt8/export.htm

    NinjaScripts will have three different names.

    1. The Filename, which will be seen in the NinjaScript Editor
    2. The Class name, which makes the script unique on your platform
    3. The Name property, which is set in OnStateChange under State.SetDefaults. This name will be seen in the Indicators dialog.

    If you do not see the indicator's name (Name property) in the Indicators dialog, I suggest checking the Log tab of the Control Center for any errors involving the indicator. If the indicator hits a run time error before it is listed, it will not be listed.

    We look forward to assisting.

    Leave a comment:


  • Grantx
    started a topic How to compile CS files

    How to compile CS files

    When somebody shares their ninjascript file how do I compile that as an indicator? I have a file with some code which I have copied to the ninjascript editor and managed to compile without any errors. The problem is that it does not show up in my list of indicators on any of my charts. It does show up in the ninjascript explorer though (under indicators).

Latest Posts

Collapse

Topics Statistics Last Post
Started by amelialliott, Today, 09:07 AM
0 responses
1 view
0 likes
Last Post amelialliott  
Started by SuperDude123, Yesterday, 06:48 PM
2 responses
48 views
0 likes
Last Post NinjaTrader_Jason  
Started by j4trdr, Yesterday, 10:23 PM
1 response
36 views
0 likes
Last Post NinjaTrader_Jason  
Started by gleno57, Yesterday, 05:21 PM
1 response
41 views
0 likes
Last Post NinjaTrader_Jason  
Started by Christopher Leggit, Yesterday, 11:09 PM
0 responses
42 views
0 likes
Last Post Christopher Leggit  
Working...
X