In my strategy code, I can reference one of the indicators (A), but not the other (B). The B indicator reference gives me a type not found error in the NinjaScript editor when trying to compile; even when the reference is generated by the strategy builder. B is not found in the Indicators namespace.
I notice that there are two differences between A.DLL and B.DLL:
1) somehow (but I don't know how and this question is the understand how) I managed to get NinjaTrader to generate A.cs that corresponds to A.DLL. The A.cs boilerplate has these lines in it, that I think adds A to the Indicator namespace.
#region NinjaScript generated code. Neither change nor remove.
namespace NinjaTrader.NinjaScript.Indicators
{
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
{
private NameOfIndicatorA ...
In contrast, while I have bin/Custom/B.DLL, I do not have bin/Custom/B.cs that contains that boilerplate to add B to the Indicators namespace. How would I get NinjaTrader to generate it?
2) I notice that the C:\Users\me\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll has a dependency on the A.dll, and that the NinjaTrader.Custom.csproj file has a reference to the name of A, its DLL, and its generated boilerplate, like this:
NinjaTrader.Custom.csproj: <Reference Include="A">
NinjaTrader.Custom.csproj: <HintPath>C:\Users\jaten\Documents\NinjaTrader 8\bin\Custom\A.dll</HintPath>
NinjaTrader.Custom.csproj: <Compile Include="A.cs" />
Conclusion and Question: Correct me if I'm wrong, but I'm assuming that both 1) and 2) need to happen for B as well, in order to allow me to reference B in my strategy ninjascript code.
The question is, how do I generate the boilerplate for B, and get it added to the .csproj file?
Thank you.
p.s. I have tried running the StrategyBuilder and referencing B in the decision rules. While the StrategyBuilder seems to reflect/introspect the B.DLL and generate a call to instantiate B, the code will not compile because it seems to be missing, at the very least, the B.cs boilerplate.
Comment