Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart AutoScale from Plot()

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

    Chart AutoScale from Plot()

    I know there is no official support for Plot but hopefully the community can help.

    Is there a way to include stuff drawn in Plot() to be part of the chart's AutoScale? I can vaguely remember seeing something while perusing the Intellisense withing the scope of Plot that I thought might be usefully for chart scaling but now I can't find it. I may have dreamed it ( ) or I might have been coding in another environment.

    Currently, to force the chart's AutoScale to include stuff drawn in Plot, I do a rather crude hack. Within OnBarUpdate, I call DrawRectangle with AutoScale set, Height and Width=0, Color.Empty at the price drawn in Plot.

    Something like:

    DrawRectangle("ScaleHigh",AutoScale,0,scalePrice,0 ,scalePrice,Color.Empty,Color.Empty,10); //Not visible (height and width = 0).

    I'm hoping there is a much cleaner way to do this within the Plot.

    Any suggestion would be appreciated.

    PS. I'm on NT6.5 but if NT7 brings something useful in this regard I would love to hear about it.

    thanks,
    shawnj

    #2
    autoscale included

    DrawRectangle(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, Color areaColor, int areaOpacity)

    NT7 version includes autoscale.

    Comment

    Latest Posts

    Collapse

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