I took NT's OBV indicator and added an SMA of the OBV itself, as I've seen in Quotetracker. All was fine and dandy until I added code to have the cross of those two lines paint the candles above. Now, no matter what I do, it shuts NT down when I try and apply it to a chart. I've done this to other indicators so I can't figure out why this one hates me. IF I can get this fixed, I plan on posting it here (along with several others I'm developing) as I like it for a long term trend indicator.
If anyone can tell me what's causing this close to happen, I would greatly appreciate it.
I'm using 6.5 and it just shuts down Ninja. Everything else still works fine. My other candlestick-bar-painting indicators work, which just makes this even stranger. Good luck, sir. I hope you can figure it out. Again, it works fine if the painting code is commented out but won't work with it in there, even if you choose NOT to paint the bars in the options window.
Maybe try adding a bunch of try/catch blocks around your if/else statements to try and isolate which one(s) is the source of the problem? If its trashing Ninja there is an unhandled exception somewhere.
The following user says Thank You to MXASJ for this post:
Havent looked at yours yet: I looked at the NT OBV in the Srategy Wizard ouputted code, and this is what I see:
// Condition set 1
if ( OBV() < Close)
Looks like there are brackets added after the OBV ??!! .. When I use the NT's OBV it has values plotted in panel 2 that dont ever do a crossup/down as the values are MANY multiples of the chart in panel 1
ps: traderwerks has a good catch! AND I am no programmer, but I dont think you can make your own dataseries have the same name as an indicator that already exists ..
Last edited by Trader.Jon; July 25th, 2010 at 09:53 PM.
Reason: looked at the code
The following 2 users say Thank You to Trader.Jon for this post: