Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dot far right margin

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

    Dot far right margin

    Hello,

    how one can draw a dot at a certain price-level (this is clear) but not below the bar - the dot shoud be drawn at the right margin of the chart window (not in the price scale) where is should stay untill "remove.."

    Couldn´t find in the helpguide an answer.

    Thanks
    Tony

    #2
    Hello tonynt,

    Thanks for your note.

    Using DrawDot would mean that you would need to redraw the dot every new bar.

    Instead you could use DrawTextFixed and use a ascii character that is a dot.

    For example:

    Code:
    dotFont = new Font("Symbol", 38);
    DrawTextFixed("myText", "·", TextPosition.BottomRight, Color.Blue, dotFont, Color.Transparent, Color.Transparent,0);

    Please let me know if this does not resolve your inquiry.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thanks for your reply. I´m working with drawtextfixed already eg for showing positions during a trade.

      In my question I meant how to draw the dot at a certain price-level, eg low of a bar, but the dot should be drawn on the right side margin (not at BottomRight)

      Thanks
      Tony



      Originally posted by NinjaTrader_ChelseaB View Post
      Hello tonynt,

      Thanks for your note.

      Using DrawDot would mean that you would need to redraw the dot every new bar.

      Instead you could use DrawTextFixed and use a ascii character that is a dot.

      For example:

      Code:
      dotFont = new Font("Symbol", 38);
      DrawTextFixed("myText", "·", TextPosition.BottomRight, Color.Blue, dotFont, Color.Transparent, Color.Transparent,0);
      Please let me know if this does not resolve your inquiry.

      Comment


        #4
        Hi tonynt,

        Thanks for the clarification.

        Basically to do this use DrawDot. The dot will have to be redrawn on each bar to stay on the right side. If you use the same tag name the dot will be "moved" instead of "copied". (don't add + CurrentBar to the tag name).

        For example:
        DrawDot("myDot", true, 0, Low[0] - 2 * TickSize, Color.Blue);

        If CalculateOnBarClose is true, this will draw a dot 2 ticks below the low of the last fully formed and closed bar. If CalculateOnBarClose is false, this will draw a dot 2 ticks below the bar that has not closed and is currently being formed.

        You can also use -1 as the bars ago value to draw the dot a bar ahead if desired.

        Please let me know if this does not resolve your inquiry.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          thanks again for your reply.

          Which part in the syntax refers to "on the right side of the chart window"? The dot is below the bar - as expected. This is the same as on the helpsites.

          You write "...on each bar to stay on the right side." But it is not drawn at the right side of the chart window. Its below the bar (or maybe -1,2,3 ahead of the bar) But how to draw at the right side margin? (the margin can vary when adding or removing indicators)

          ???

          Thanks
          Tony

          Originally posted by NinjaTrader_ChelseaB View Post
          Hi tonynt,

          Thanks for the clarification.

          Basically to do this use DrawDot. The dot will have to be redrawn on each bar to stay on the right side. If you use the same tag name the dot will be "moved" instead of "copied". (don't add + CurrentBar to the tag name).

          For example:
          DrawDot("myDot", true, 0, Low[0] - 2 * TickSize, Color.Blue);

          If CalculateOnBarClose is true, this will draw a dot 2 ticks below the low of the last fully formed and closed bar. If CalculateOnBarClose is false, this will draw a dot 2 ticks below the bar that has not closed and is currently being formed.

          You can also use -1 as the bars ago value to draw the dot a bar ahead if desired.

          Please let me know if this does not resolve your inquiry.
          Last edited by tonynt; 05-02-2013, 03:34 PM. Reason: clearify

          Comment


            #6
            Hi tonynt,

            Because there is no DrawDotFixed, the only way to keep the dot at the far right of the chart is to have it redraw under the most newly created bar using calculate on bar close false.

            This is not a true align right. DrawTextFixed is the only drawing object that can be truely fixed to a position on the window. All other drawing objects are relative to the x (time) and y (price) positions.


            Please let me know if this does not answer your question.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by tonynt View Post
              Hello,

              thanks again for your reply.

              Which part in the syntax refers to "on the right side of the chart window"? The dot is below the bar - as expected. This is the same as on the helpsites.

              You write "...on each bar to stay on the right side." But it is not drawn at the right side of the chart window. Its below the bar (or maybe -1,2,3 ahead of the bar) But how to draw at the right side margin? (the margin can vary when adding or removing indicators)

              ???

              Thanks
              Tony
              Use a large enough negative offset for the dot.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by judysamnt7, 03-13-2023, 09:11 AM
              4 responses
              59 views
              0 likes
              Last Post DynamicTest  
              Started by ScottWalsh, Today, 06:52 PM
              4 responses
              36 views
              0 likes
              Last Post ScottWalsh  
              Started by olisav57, Today, 07:39 PM
              0 responses
              7 views
              0 likes
              Last Post olisav57  
              Started by trilliantrader, Today, 03:01 PM
              2 responses
              22 views
              0 likes
              Last Post helpwanted  
              Started by cre8able, Today, 07:24 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X