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 Christopher_R, Today, 12:29 AM
      0 responses
      9 views
      0 likes
      Last Post Christopher_R  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      166 responses
      2,235 views
      0 likes
      Last Post sidlercom80  
      Started by thread, Yesterday, 11:58 PM
      0 responses
      3 views
      0 likes
      Last Post thread
      by thread
       
      Started by jclose, Yesterday, 09:37 PM
      0 responses
      8 views
      0 likes
      Last Post jclose
      by jclose
       
      Started by WeyldFalcon, 08-07-2020, 06:13 AM
      10 responses
      1,415 views
      0 likes
      Last Post Traderontheroad  
      Working...
      X