NexusFi: Find Your Edge


Home Menu

 





Indicator forcing NinjaTrader to close / shutdown


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one dsraider with 8 posts (2 thanks)
    2. looks_two Trader.Jon with 3 posts (3 thanks)
    3. looks_3 max-td with 2 posts (0 thanks)
    4. looks_4 MXASJ with 1 posts (1 thanks)
      Best Posters
    1. looks_one Trader.Jon with 1 thanks per post
    2. looks_two MXASJ with 1 thanks per post
    3. looks_3 traderwerks with 1 thanks per post
    4. looks_4 dsraider with 0.3 thanks per post
    1. trending_up 6,254 views
    2. thumb_up 7 thanks given
    3. group 3 followers
    1. forum 14 posts
    2. attach_file 2 attachments




 
Search this Thread

Indicator forcing NinjaTrader to close / shutdown

  #1 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Hey All,

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.

Dave

Attached Files
Elite Membership required to download: RaiderOBV.zip
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
  #3 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Dave,

Does it do more than just shut NT down? (windows still working?)

What version NT ??

I am going to image my drive before I try this ...

TJ

Reply With Quote
Thanked by:
  #4 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Hey Jon,

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.

Thanks,
Dave

Reply With Quote
  #5 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

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.

Reply With Quote
Thanked by:
  #6 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

MXASJ,

Thanks for the tip. I think the issue has to do with how I'm calling the SMA line:

if(OBV[0] > SMA(Close, Period)[0]) works but obviously isn't correct. Looks like I just don't know how to call my own indicator .

Reply With Quote
  #7 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


Quoting 
if(RaiderOBV(Close, Period)[0] > SMA(Close, Period)[0])

Just glancing at the code, inside RaiderOBV calling this is not a good idea.


See Recursion


Reply With Quote
Thanked by:
  #8 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Dave,

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()[0] < Close[0])

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

Jon

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 ..

Reply With Quote
Thanked by:
  #9 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

You. Guys. Rock.

A night's sleep helped me digest everything you were saying. One or too minor touches, and I'll post.

Thanks again,
Dave

Attached Thumbnails
Click image for larger version

Name:	OBV.jpg
Views:	205
Size:	50.2 KB
ID:	17471  
Reply With Quote
  #10 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Dave,

Looks very nice ... I love the way it paints, and I dont normally go in for bar painting options

Jon

Reply With Quote




Last Updated on July 27, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts