For example, the code below (from your documentation) allows you to Request a Bars<T> for use. Is there a way to similarly remotely instantiate an indicator?
For example, can you request Bars (like below), Request and initialize an indicator, pass in a BarsArray and input params like you would from a strategy? I know there is an easy answer, I just can't find it. I'm going to read the help documentation again, but if you could point me in the right direction, I can figure it out from there.
When you commented : // Do something with the returned bars here. can you pass them along to an indicator for execution? (I'm repeating myself, sorry, you get what I'm asking)
// Request the bars
barsRequest.Request(new Action<BarsRequest, ErrorCode, string>((bars, errorCode, errorMessage) =>
{
if (errorCode != ErrorCode.NoError)
{
// Handle any errors in requesting bars here
NinjaTrader.Code.Output.Process(string.Format("Err or on requesting bars: {0}, {1}",
errorCode, errorMessage), PrintTo.OutputTab1);
return;
}
// Do something with the returned bars here.
for (int i = 0; i < bars.Bars.Count; i++)
{
// Output the bars
NinjaTrader.Code.Output.Process(string.Format("Tim e: {1} Open: {2} High: {3} Low: {4} Close: {5} Volume: {6}",
bars.Bars.GetTime(i),
bars.Bars.GetOpen(i),
bars.Bars.GetHigh(i),
bars.Bars.GetLow(i),
bars.Bars.GetClose(i),
bars.Bars.GetVolume(i)), PrintTo.OutputTab1);
}
}));
Thank you much for any assistance!
- Mike
Comment