Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Breakout of X Bar Low or X Bar High

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

    #16
    Hello kumaresh11live,

    Thank you for your reply.

    Yes, that was correct. Your error comes from the fact that you've copied this line twice:

    double value = MIN(Low, 20)[1];

    Basically that means you're trying to create a variable twice, which you can't do.

    Remove the second appearance of that line and it should compile for you.

    Please let us know if we may be of further assistance to you.

    Comment


      #17
      Thk you Kate
      I complied my 1st indicator script !!! success !!!
      i applied to my chart but dont see any dots or lines

      here is screen shot
      left side is script and right side is chart




      Comment


        #18
        Hello kumaresh11live,

        Thank you for your reply.

        Most likely it's because you're checking the current bar to see if the low is lower, but since it updates on the current bar you want to actually look at the previous bar.

        In this line, change the 0 in brackets to a 1 to make it check the previous bar:
        double value = MIN(Low, 20)[0];

        Then recompile, and remove and readd the indicator to the chart.

        Please let us know if we may be of further assistance to you.

        Comment


          #19
          Hello Kate
          Now, I see the signals as arrows but I set it to Dots, as you can see here
          obviously the script has a line to draw Arrowdown but I gave Dots during my Indicator wizard









          Comment


            #20
            Kate - also I would need the Dots to have 2 of these

            1) need diff color for Low and diff color for High'
            2) need dots size adjustable, but I already see this parameter

            so we need to overwrite that "ArrayUp", ArrayDown" to 2 diff colors of Dots

            Comment


              #21
              Hello kumaresh11live,

              Thanks for your replies.

              This is Paul responding for Kate who is out of the office.

              Your indicator shows that you have added a plot that is set to plot dots. However the code is not assigning anything to that plot. Instead a Draw.ArrowDown() is used and that is why you are only seeing arrows.

              To use the plot, I would suggest removing (or commenting out for now) the line that starts with Draw.ArrowDown(...) and replace the Draw.ArrowDown(...) with the plot assignment set to the value (Y axis) that you want to show the dots at on the current bar.

              For example try this:

              if (Low[0] < value)
              {
              MinMaxInput_Dots[0] = Low[0] - 3 * TickSize; // Plot a dot 3 ticks below the Low of the current bar
              }


              For coloring the dots of the plot differently, you would need additional code called PlotBrushes where you assign the brush color at the time of the plot for just that dot (in this case). For example:

              if (Low[0] < value)
              {
              PlotBrushes[0][0] = Brushes.Red; // set the dot to be Red in this case of (Low[0] < value)
              MinMaxInput_Dots[0] = Low[0] - 3 * TickSize; // Plot a dot 3 ticks below the Low of the current bar
              }


              Reference: https://ninjatrader.com/support/help...lotbrushes.htm

              Note: I see you have stated more than once that you are a trader and not a programmer. If you want this created for you we can provide references to professional 3rd party programmers that are well versed in Ninjascript programming who would be happy to create what you need.

              Comment

              Latest Posts

              Collapse

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