|
Denver
Experience: Intermediate
Platform: NinaTrader 7
Trading: ES, Gold, Oil
Posts: 23 since May 2016
Thanks Given: 3
Thanks Received: 18
|
I found an issue in the code on line 365 where it was not loading news if the timer != 0. This may have been the issue but I am not sure. I changed that line to == 0 and will test it again. Hopefully that was it.
// download the news data every news refresh interval (not bar interval).
if (lastNewsUpdate.AddMinutes(newsRefeshInterval) < DateTime.Now && Timer != 0){
changed to
// download the news data every news refresh interval (not bar interval).
if (lastNewsUpdate.AddMinutes(newsRefeshInterval) < DateTime.Now && Timer == 0){
Makes sense to me why it wasnt working... The strategy was not finding a news event to trigger because it would never have loaded news.
Doesnt make sense why when I plot the indicator on a chart it was displaying the news though. But I did notice that the indicator would have to be reloaded after a news event and would never refresh automatically to display them.
If this doesnt fix it then yes, ill be reaching out to everyone again in hopes to figure this out. I'll keep everyone posted. If anyone has been looking for similar behavior from an indicator I thought this was a good way to implement what I needed and could not find the behavior shared on the site.
|