I have a strategy that uses a real-time indicator that I wrote myself.
During Initialize it, I added it to my chart using:
Add(RTIndicator(100));
Later on, in my strategy code, in OnMarketData, I refer to the indicator as
indicator = RTIndicator(100);
newEntry = indicator.x[0];
where x is a series that I calculate in the indicator.
Is this correct? Will calling RTIndicator(100) use the data that I have been accumulating while my strategy has been running? Or will it create an entirely new indicator and start accumulating new data from that point?
Ever since this Tuesday, I've been having trouble with my NT strategies not working and I'm trying to figure out why. I have an indicator that calculates daily values that I use on my real-time strategy, however, since this week, I'm finding that for whatever reason, the indicator is returning the previous day's values, so I'm trying to narrow down the reason why. So I'm thinking of changing my indicator to being real-time but I'm worried that it won't accumulate the proper data.
Thanks,
Steve

Comment