Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

output window

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

    output window

    Hi Ninjatrader support,

    I have a problem with what I see in the output window.
    I am developing a custom indicator and just for debuging purposes I need the output window. I expect to see a single value. For example I ask to show a result of MRO (most recent occurrence). So instead of returning a single value, a lot of values are returned.
    How can tweak a code or some settings so that I can see a single value?

    Thanks

    #2
    ionaz,

    There is no real way to do this currently in the output window. You could use something like DrawTextFixed() : http://www.ninjatrader.com/support/h...wtextfixed.htm
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi AdamP,

      Thank for your reply.

      Query 1
      I understand that it is not possible to do that in the output window. I thought maybe it might be possible to change something in the code to force output window to return a single value.

      Query 2
      I have a code:
      int ago = MRO(delegate {return EMA(21)[0] > SMA(89)[0];}, 1, 10);
      if(ago > -1)
      Plot0.Set(1);

      Print (ago);

      My goal is to filter out the stocks where ema(21) is above sma(89) for the last 10 days. I believe this code above does that and market analyzer returns 1 in such a case. However I have just observed a stock NIHD(daily), where this condition is not met (ema(21) is below sma(89)) but 1 is still returned as if the condition is met.
      Do you know what goes wrong here and what can I do about it?

      Query 3
      In the Output Window, which values, the ones at the top or the ones at the bottom represent the latest data? It looks like the top ones represent then newest data.

      The top values are:
      -1
      0
      0
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1

      And the bottom values are:
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1
      -1

      Comment


        #4
        Your code says to print all values of "ago"

        Do you mean this:

        to only print "ago" if it is >-1 ?

        Code:
        int ago = MRO(delegate {return EMA(21)[0] > SMA(89)[0];}, 1, 10);
        
        if(ago > -1)
        { 
            Plot0.Set(1);
            Print (ago);
        }
        Originally posted by ionaz View Post
        Hi AdamP,



        Query 2
        I have a code:
        int ago = MRO(delegate {return EMA(21)[0] > SMA(89)[0];}, 1, 10);
        if(ago > -1)
        Plot0.Set(1);

        Print (ago);

        My goal is to filter out the stocks where ema(21) is above sma(89) for the last 10 days. I believe this code above does that and market analyzer returns 1 in such a case. However I have just observed a stock NIHD(daily), where this condition is not met (ema(21) is below sma(89)) but 1 is still returned as if the condition is met.
        Do you know what goes wrong here and what can I do about it?

        -1

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        561 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        325 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X