Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No drew for the CrossBelow

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

    No drew for the CrossBelow

    I wrote the attached basic indicator.
    It drews the green diamond below price bar as it should. (jWilliams2 cross the 20 line up one bar ago)
    It does not drews the red one above when conditions applied. (jWilliams2 line cross 80 line down one bar ago)

    Any help?
    Attached Files

    #2
    Hi Tzachi,

    Let's check for a few things...
    1. Do you get any errors in the Log tab of the Control Center?
    2. Try adding a Print statement to ensure your condition for the DrawDiamond is being satisfied: http://www.ninjatrader.com/support/f...ead.php?t=3418

    Something like:
    Code:
    else if (CrossBelow(jWilliams2(8,14,0),80,1))
    			{
    				Print("Condition 2 Satisfied");
    				DrawDiamond("DownArrow" + CurrentBar+ TickSize, 0, High[0] + 4*TickSize, Color.Red);
    
    			}
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply
      Added Print("Condition 2 Satisfied"); and nothing printed on the output window. (Window empty)
      No error on log.

      Comment


        #4
        HI Tzachi,

        You'll need to make sure your condition is being satisfied in order to see the Draw method executed. By visual inspection, have you been able to verify this?
        TimNinjaTrader Customer Service

        Comment


          #5
          What do you refer to "By visual inspection" ?

          On the chart, each time the jWilliams2 line crosses up from below the 20 line its print a green diamond on price panel.

          Each time the line crosses down from above the 80 line, nothing happened on the chart.

          Also, when i try just to get the diamond to print when color of jWilliams changes (up, or down) i get diamonds every bar and not just on the first bar after the change. (on a different indicator)
          Last edited by Tzachi; 01-10-2011, 09:50 AM.

          Comment


            #6
            Hi Tzachi,

            If you export the indicator, I'd be happy to take a quick look: http://www.ninjatrader.com/support/h...tml?export.htm
            TimNinjaTrader Customer Service

            Comment


              #7
              Tim,

              To post it here as a zip file?

              Comment


                #8
                attached zip format
                Attached Files

                Comment


                  #9
                  Hi Tzachi,

                  The attachment you provided was a text file, I'll need the NinjaScript, you can export it with these steps: http://www.ninjatrader.com/support/h...tml?export.htm
                  TimNinjaTrader Customer Service

                  Comment


                    #10
                    When I try to export it says Error Compiling.

                    When I open to edit and use F5 its all fine. ??????

                    Comment


                      #11
                      Tzachi,

                      When you open a script, and compile, do you see errors listed at the bottom of the editor?
                      TimNinjaTrader Customer Service

                      Comment


                        #12
                        None. Compile with no problems.

                        Comment


                          #13
                          Tzachi,

                          What is the exact error when you attempt to export.
                          TimNinjaTrader Customer Service

                          Comment


                            #14
                            When ttry to xport: "Error compiling export assembly. Please check your log".

                            When in edit, it compiles with no errors.

                            Comment


                              #15
                              Tzachi

                              Please see the .NET Referencing steps to resolve this: http://www.ninjatrader.com/support/h...t_problems.htm
                              TimNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

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