Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnRender

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

    OnRender

    I am still converting a big indicator from NT7 to NT 8.

    Lots of changes specially on OnRender method.

    I am converting these rectangles bounds,max, min like that :

    bounds.Bottom = ChartPanel.X + ChartPanel.H;
    bounds.Top = ChartPanel.X;
    bounds.Left = ChartPanel.X;
    bounds.Right = ChartPanel.X+ChartPanel.W;

    max = ?
    min = ?


    Need help !

    #2
    These properties are now documented in NT8 and should give you an idea of what you're looking for:



    You'll find info specific to ChartPanel here:



    ChartPanel.MinValue
    ChartPanel.MaxValue
    MatthewNinjaTrader Product Management

    Comment


      #3
      Sorry those min/maxes are the Y-value, I understand you're looking for the bounds of the chart panel.

      The min value would always be 0, and the max is chartScale.Height;

      You could also use that the GetYByValue() method to conver the ChartPanel.MinValue and MaxValue to find your coordinates:




      Code:
       int      maxValue = chartScale.GetYByValue(ChartPanel.MaxValue);
       int      minValue= chartScale.GetYByValue(ChartPanel.MinValue);
      MatthewNinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      3 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      7 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X