Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

height of printed item

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

    height of printed item

    hello,

    i would like my indicator to draw its objet - an arrow lets say Higher or lower than the bar by "X" amount

    How would I go about this

    thankyou in advance

    #2
    ​as you can see the two overlap

    Click image for larger version

Name:	image.png
Views:	122
Size:	17.9 KB
ID:	1326952

    Comment


      #3
      Hello NISNOS69,

      Thank you for your post.

      You can offset the y value by x amount of ticks.

      For example,

      //draw diamond 5 ticks above the High
      Draw.Diamond(this, "tag1", true, 0, High[0] + (5 *TickSize), Brushes.Red);

      Please let us know if you have any further questions.

      Comment


        #4
        hello

        thankyou for your reply

        I tried this with the 40 tick size but nothing changed?


        public void Initialize(int barIndex)
        {
        this.validLows.Add(barIndex);
        Draw.ArrowUp(this, "NewBearishLow" + barIndex.ToString(), true, CurrentBar - barIndex, Low.GetValueAt(barIndex) - (40 *TickSize), Brushes.Pink);​

        Comment


          #5
          Hello,

          You'll likely need to debug your script if the drawing object isn't appearing as expected. It looks like you're calling it from a custom method. Attached is a basic sample script that demonstrates drawing an arrow 40 ticks above the high.

          To understand why the script is behaving as it is, such not placing drawing objects where expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

          In the strategy add prints (outside of any conditions) that print the date time of the bar and all values compared in every condition.

          The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for this action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

          The debugging print output should clearly show what the condition is, what time the conditions are being compared, all values being compared, and how they are being compared.

          Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

          I am happy to assist you with analyzing the output from the output window.

          Below is a link to a support article that demonstrates using informative prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.

          https://support.ninjatrader.com/s/ar...nd-TraceOrders
          Attached Files

          Comment


            #6
            thankyou sooooooooooooooooooooo much!!!

            Comment


              #7
              any reason it takes ages to update the chart? like minutes at a time?

              Comment


                #8
                Hello,

                I'm not seeing the sample script take any significant amount of time to update. It updates OnBarClose as expected.

                Are you referring to your own script or the sample script?

                Comment


                  #9
                  Apologies no..
                  My chart with its indicators . when i make any change it jus freezes for ages before implementing the changes

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  557 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  324 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  545 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X