Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawDot and Plot line mysteries

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

    DrawDot and Plot line mysteries

    Dear NT programmers,

    1. I am developing my own indicator on NT 6.5 and using both Plot and DrawDot methods. I get visual results and indicator is very usable. However what amazes me is the fact, that Dots I draw can be easily removed via context menu on graph itself by selecting Drawing Tools-> Remove Drawing Objects. And this is REAL problem. Also they are selectable and I can move these around graph easily with mouse... What I am missing? How to make them permanently sticked on graph ? I draw dots with:

    Code:
    DrawDot("MRising"  + CurrentBar, true, 0, GraphValue[0], mRisingColor);
    2. Next interesting thing is that plotted line somehow lacks of sharpness. Looks like it is antialiased or smth... Are there any settings to increase "sharpness" of plotted object? I plot line with this:

    Code:
    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "ZeroLine"));
    Plots[0].Pen.DashStyle = DashStyle.Solid;
    Plots[0].Pen.Width = 4;
    3. And last thing - I needed to draw big dot and tried to draw these with DrawText using simple dot symbol, as many people on forum talk about. I was successful, however I had to gues start Y position to line center of dot to my zero line. However strange thing was that despite the fact that dots was written constant 0.005 Y coordinate - sometimes they were up more than constant. This was especialy visible scrooling graph several days ago. Is this somehow related to Auto Scale or what? Again how to fix texted dot possition so it remains rock stable at constant Y coordinate?

    Code:
    mFont = new Font("Symbol", 38);
    DrawText("m"+ CurrentBar, true, "·", 0, 0.005, ydBullishColor, mFont, 
                StringAlignment.Center, Color.Transparent, Color.Transparent,0);
    P.S. Why we should use Color.FromKnownColor declarations? What is difference compared to simple Color."ColorName" ?

    Thank you very much for suggestions.
    -Andrius.
    Last edited by andrius; 12-04-2010, 11:47 PM.

    #2
    andrius,

    1) With NT7, you can "lock" drawing objects so they cannot be moved. Unfortunately this option is not present in NT6.5.

    2) You can create a "sharper" line by plotting it with a smaller width.

    3) Can you please describe this a bit more? I have a feeling this is simply the auto-scaling feature kicking it because the dot is a fixed distance from your Y location, but all of the rest of the chart is scaled automatically.

    4) I will have someone get back to you with the color question, but it doesn't really make much of a difference. You can use Color.[Color] or the Color.FromKnownColor() method.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Andrius,

      For our intents and purposes there really is no big difference between how you create your colors. If you want to just go Color.Blue for instance you can definitely do that.
      Josh P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 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
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X