Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Autoscale with Plot Override

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

    Autoscale with Plot Override

    I have code that uses a plot override...

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

    The code works as intended...plotting a small line at the left edge of the chart, towards the
    top. (created by a graphics path and then plotted it using graphics.DrawPath( etc. etc.)

    My problem is that occasionally, when price drops, this plot will 'scale' off' the chart
    temporarily disappearing from view. If I manually compress the chart by dragging on the right side, the line shows up, so I know the plot did not disappear...it only scaled off the visible chart..


    I have AutoScale = true.....
    but for whatever reason this line doesn't seem to 'hold' the scale.


    What am I missing?
    Why does AutoScale not seem to work for this plotted line?

    Thanks..........

    #2
    photog53, the AutoScale would only apply to regular drawing / plot objects, not to the custom ones generated via the C# Plot override. You can look into adding a regular transparent plot or drawing object at your min / max values so the AutoScale would factor those in.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks.....

      I was afraid that would be the case....but frequently you guys have very elegant solutions that I had not thought of, so I generally ask the question.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rocketman7, Today, 02:12 AM
      7 responses
      28 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by guillembm, Yesterday, 11:25 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by junkone, 04-21-2024, 07:17 AM
      10 responses
      148 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by tsantospinto, 04-12-2024, 07:04 PM
      6 responses
      101 views
      0 likes
      Last Post tsantospinto  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      7 responses
      28 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X