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

printing to output window

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

    printing to output window

    I am trying to print to the output window but all I get is:

    17
    hello

    My code is:

    Code:
                    if( Swing(CUMRSI(triggerValue,3), 3).SwingHigh[0] >
                        Swing(CUMRSI(triggerValue,3), 3).SwingHigh[2] )
                    {
                        Print("Higher high");
                    }

    #2
    Hello ShruggedAtlas,

    Thank you for your inquiry.

    "Higher high" would only print out if your IF statement is true. I wouldn't know where "17" and "hello" came from as it is not here in your code. Would you happen to have these values specified elsewhere in your code, or would you have any other indicators or strategies that use Print statements that may be printing out these values?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      non of my indicators have print statements as far as i can tell. This is the first time I have attempted to use print statements. I will investigate further.

      what i'm trying to do is create a rudimentary divergence indicator using the swing indicator. Based on my code it doesn't seem to trigger the print statement as you suggested. I guess I need to play with the swing strength values and or adjust the bars back to compare. Once I get that right i suppose I'll be able to figure it out.
      Last edited by ShruggedAtlas; 06-03-2015, 10:31 AM.

      Comment


        #4
        I got it to work by increasing the numer of bars to look back for the recent swing high or low. i got the print statement to work. As for the 17 hello thing...i have no idea

        Comment


          #5
          Hello ShruggedAtlas,

          The "17" and "hello" cannot be printed out to the output window without a Print statement somewhere in your code or the code of other indicators or strategies. Are you running any third party indicators / strategies that you have not developed yourself? Those may have Print statements in them that would be printing out that output.
          Zachary G.NinjaTrader Customer Service

          Comment


            #6
            yes there are about 3 others...I'll have to look through the code on those and see where it is.
            Thanks!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Tim-c, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            2 views
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,772 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            945 views
            0 likes
            Last Post spwizard  
            Working...
            X