Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is the ways to plot price label at X-axis value equals to ArrowLine Start X-axis

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

    What is the ways to plot price label at X-axis value equals to ArrowLine Start X-axis

    Hi all,

    I'm developing a script which shows the price of ArrowLine end. The code I use is the following

    public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)

    SizeF stringSize = new SizeF() ;
    ChartArrowLine l1 = (co as ChartArrowLine);

    double bb = l1.StartBarsAgo;
    double gg = l1.StartY;

    int x2 = ????????????

    int y2 = (bounds.Y + bounds.Height) - ((int)(((gg-min) / (max-min)) * bounds.Height))-30;
    string s = l1.EndY.ToString(_priceFormat);
    stringSize = graphics.MeasureString( s, largerFont ) ;
    graphics.DrawString(s, largerFont, l1.Pen.Brush, x2, (y2), _format1);

    I have the code to plot price label at Y-axis value equals to ArrowLine Start Y-axis value.
    What is the ways to plot price label at X-axis value equals to ArrowLine Start X-axis value.

    Please , help!

    #2
    Hi Alex, sorry for our late reply - custom plotting via C# would be unfortunately not a directly supported area, however for your ArrowLine start you would have a Datetime or a bar index, correct?

    Then the ChartControls would offer a GetXByTime or GetXByBarIdx to determine the needed X value.
    Last edited by NinjaTrader_Bertrand; 09-10-2013, 03:24 AM. Reason: typo

    Comment


      #3
      Bertrand

      Thank you very much! I knew that it should be simple.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      580 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      335 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      102 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X