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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X