Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am looking at creating an Indicator which passes a new Input series for processing.
I have been playing with the Bars object:
In the OnBarUpdate:
I would then like to be able to pass this new object after modification or addition of more data to an indicator such as:
then plot, etc....
For some reason, this doesn't seem to work. This should pretty much pass the current data into a new Bars object and be processed as such through EMA, but it doesn't seem like the newbars object is being updated.
Has anyone worked with the Bars Object like this before?
Can you help answer these questions from other members on NexusFi?
I think your idea is not compatible with the architecture of NinjaTrader. I guess what you want to achieve is use a second bar series and then pass values calculated from that bar series to an indicator.
This can only be achieved, if your new bars are called by OnBarUpdate(). They should also be called in a synchronized way with the first bar series. NInjaTrader will do you this favor, if the secondary bar series needs to be added in the Initialize() section of your indicator:
Once you have added the bars you can call them from within an indicator, but you cannot apply an EMA to a bars object, but only to a DataSeries object, so you the expression would be
where Closes[1] is the DataSeries construed from the first secondary bars object added.
Now every incoming tick of real-time data will first trigger an update of the main bar series and then an update the secondary bar series.
I was hoping that may not be the case, but feel you may be correct. There is one setting at the end of the Add function which is a bool for RealTime. I was hoping that would signal somehow to use the passed series... There are several Indicators that use more than a simple DataStream, they us the Bar data Open,Close,High,Low. It would be nice to figure out how to wrap the data such that it can be feed back into these indicators. It would allow fabrication of future data as well as correcting outliers in back data. This might help predict when action needs to take pace a little sooner than when the event has already passed by and you can't get in fast enough (setting market stop limits for example).
I might contact NinjaTrader support to see if they can shed light on if this is possible. I would really like to try a few ideas...