I have a complex indicator that I need to simplify by separating out a lot of my code into separate files. I am having difficulties separating out the code. Instead of asking partial/pointed questions, I have created a full sample. There are three notable attributes of this sample.
1. This sample performs some performance calculations passing Price to methods and classes.
2. I also want to separate my code by placing it in separate folders & namespaces.
3. I also posted the code on Github and determined a method to version just my folders and not other indicator/addon code.
- See: https://github.com/eTradeTeam/NinjaSamples or the attached NinjaSamples.zip. You will need to place the code in the Indicators and Addons folder manually. Note, the GitHub files Addons/ExampleAddon/ExIndicShare and Indicators/Example/IndicEx1 and Indicators/Example/IndicEx2 are not part of this sample. I will be creating another post using these for shared objects between indicators.
Issue #1: I can't create a folder under Indicators and Addons with the same name. i.e. Indicators/Example and Addons/Example. I get an error that a folder with the same name already exists. I am a novice C# programmer. I would think these would be different namespaces. NinjaTrader.NinjaScript.Indicators.Example should be different than NinjaTrader.NinjaScript.Addons/Example. Question #1. So is this normal in C# or is it a nuance of the NinjaScript Editor?
Issue #2: My indicator can see the methods I enclosed in a class, but not the methods I in the exPerfMethods file.
Question #2: What am I missing? I think this should work.
Thanks in advance, JeffCO
Comment