You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Mindset7of9, sorry about the late response, just noticed.
If the code does not compile, I'm not sure what the issue is, guessing it's not a big deal, but my windows laptop broke, so I really don't have a way to check myself at this point.
If the code compiles, but crashes when it's run, i think it's missing history.
Not really working on Ninjatrader stuff too much these days, but, the issue with the relvolavg crashing is missing history.
SO, for example, for relvol on a 15 minute chart for the bar starting at 9:30, I go back in "history" and try to grab the 9:30 bar for X previous days.....lets say I can't find the 9:30 bar for 2 days ago, i throw an exception.
I have a few ideas on how to deal with a missing history bar...like for example:
Just skip it, so if your relvol period is 5 days, and your missing day 3, just calc the average period volume for 4 days.
Or average the bar before and the bar after the missing bar and use that for the missing bars volume.
Here is a link to where I throw an exception for missing history, so that would be the spot in the code to start to deal with it if you want to give it a go:
Hi
Copied and pasted your relvolavg code and it causes NT8 to crash FYI.
The text was updated successfully, but these errors were encountered: