NexusFi: Find Your Edge


Home Menu

 





NinjaTrader Debugging


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one rleplae with 5 posts (1 thanks)
    2. looks_two usdivers with 4 posts (0 thanks)
    3. looks_3 Fat Tails with 1 posts (2 thanks)
    4. looks_4 kuchen with 1 posts (0 thanks)
    1. trending_up 3,419 views
    2. thumb_up 6 thanks given
    3. group 7 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
Search this Thread

NinjaTrader Debugging

  #1 (permalink)
 abdunbar 
El Paso, Texas
 
Experience: Intermediate
Platform: Ninja
Trading: Euro
Posts: 27 since Jan 2011
Thanks Given: 32
Thanks Received: 31

I discovered this by accident. I have wished to be able to set watches for variables in order to isolate errors. Without getting into using Visual Studio, the only choice is the print statement and the output window. In the past, I had always loaded the indicator or strategy on a chart with the chart at the most recent time, all the way to the right and the output window would fill with a bunch of print statements that I would have to go back and analyze. But...

If I load the script with the chart scrolled all the way back to the beginning of my data, the script only runs to the current right edge of the chart. Then I can step through the chart bar by bar and watch the Print statement give me the values of my variables as the bars print.

If everyone else knew this already sorry. But it made my day.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



abdunbar View Post
I discovered this by accident. I have wished to be able to set watches for variables in order to isolate errors. Without getting into using Visual Studio, the only choice is the print statement and the output window. In the past, I had always loaded the indicator or strategy on a chart with the chart at the most recent time, all the way to the right and the output window would fill with a bunch of print statements that I would have to go back and analyze. But...

If I load the script with the chart scrolled all the way back to the beginning of my data, the script only runs to the current right edge of the chart. Then I can step through the chart bar by bar and watch the Print statement give me the values of my variables as the bars print.

If everyone else knew this already sorry. But it made my day.


Your finding is correct. You can scroll back your chart, look for special cases to debug and then refresh the chart via F5. That way you can directly deal with any problems found on the chart.

However, you need to disconnect from any datafeed. Otherwise OnBarUpdate() will run until the end of the (hidden section) of the chart.

Reply With Quote
Thanked by:
  #4 (permalink)
 kuchen 
washington DC
 
Experience: Intermediate
Platform: NJ7
Trading: ES
Posts: 1 since Jul 2012
Thanks Given: 0
Thanks Received: 0

Hi guys,
I spent countless hours using the outbox, when I shall have started using VS earlier.
For some things coding inside NJ is faster and easier, especially if you know exactly what to code.
When doing this for more complex multi time frame and interconnected indicators and strategies, the call sequence and indexing etc. can get real messy.

So using VS is a smart idea and will save you lots of nerves, time & money.
My VS debugging was not working for long time despite following all steps. NJ support was struggling to figure out the reason for this problem, too.

Error message: no symbols loaded (in VS)
Reason: Only after a direct change on a script in NJ, the debugging symbol information are being loaded onto NJ.
Now this may seem logical, but is still kind of an odd behaviour when you try to set up VS for debugging or start from a new NJ start.

Hope this helps someone.
Matt

Reply With Quote
  #5 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

I was also never able to activate debugging in VS for NT indicators
I gave up on it

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 usdivers 
Darwin
 
Experience: Advanced
Platform: Ninjatrader
Posts: 55 since Sep 2009
Thanks Given: 54
Thanks Received: 42

Trying to debug my NT8....however a new error has come up that I can't figure out. I am hoping the collective intellegence here can help me.

Thanks in advance.

Reply With Quote
  #7 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


usdivers View Post
Trying to debug my NT8....however a new error has come up that I can't figure out. I am hoping the collective intellegence here can help me.

Thanks in advance.

Sounds like a conflict..

Try to undo the last installed package, see if the problem goes away..

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 usdivers 
Darwin
 
Experience: Advanced
Platform: Ninjatrader
Posts: 55 since Sep 2009
Thanks Given: 54
Thanks Received: 42


rleplae View Post
Sounds like a conflict..

Try to undo the last installed package, see if the problem goes away..

That's what I thought as well, I can't remember what the last installed package was....is there a way for me to figure this out?

Reply With Quote
  #9 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

What is worrying a bit more, is that it says something about ninjatrader core also
maybe open a support ticket ? the NT folks are in general very helpful and reactive
although they may ask you to do a clean install and then reinstall all the indicators.

How complex is your setup ?

Did you buy a lot of third party stuff ?

the infralution product, is generic and maybe just the .net encryptor or the licensing
part, it need to dig deeper to see if NT is using it

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #10 (permalink)
 usdivers 
Darwin
 
Experience: Advanced
Platform: Ninjatrader
Posts: 55 since Sep 2009
Thanks Given: 54
Thanks Received: 42



rleplae View Post
What is worrying a bit more, is that it says something about ninjatrader core also
maybe open a support ticket ? the NT folks are in general very helpful and reactive
although they may ask you to do a clean install and then reinstall all the indicators.

How complex is your setup ?

Did you buy a lot of third party stuff ?

the infralution product, is generic and maybe just the .net encryptor or the licensing
part, it need to dig deeper to see if NT is using it

NT support figured it out....all I had to do was boot up references....and somehow it fixed itself.

Reply With Quote




Last Updated on January 1, 2018


© 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