Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debug in VS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Debug in VS

    Hi,
    I'm having trouble debugging from my Visual Studio 2008.
    I did exactly as instructed on the guide.
    a) On NT Editor - enable "Debug Mode"
    b) On VS 2008 - "Attach To Process" - field set to "Managed Code"
    c) Set my breakpoint to line where - Print(High[0]);
    d) I then ran the strategy on a EUR/USD chart

    Nothing shows up on the locals window on VS. I even reload Ninjascript and reload all historical data on the chart. Nothing shows up on locals.

    The following is my strategy

    protectedoverridevoid Initialize()
    {
    AddPointAndFigure("$EURUSD", PeriodType.Tick, 1, 5, 3, PointAndFigurePriceType.HighsAndLows, MarketDataType.Last);
    }

    protectedoverridevoid OnBarUpdate()
    {
    if (BarsInProgress == 1)
    {
    Print(High[0]);
    Print(Low[0]);
    Print("The Day is: " + ToDay(Time[0]));
    Print("The Time is: " + ToTime(Time[0]));
    Print("");
    }
    }

    #2
    Hello,

    When you hit the break point does it stop inside of visual studio?

    -Brett
    BrettNinjaTrader Product Management

    Comment


      #3
      when i ran the strategy on the chart, the nt chart updated, otherwise nothing updates on vs.

      Comment


        #4
        Hello,

        This is an area we can't support in too much detail however it is my understanding that you would need to set a breakpoint for the code to break before you could get any updates in VS.

        -Brett
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X