Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X