Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Mapping NT 7 Plot Override to OnRender Override (???)

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

    Mapping NT 7 Plot Override to OnRender Override (???)


    NT7

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

    base.Plot(graphics, bounds, min, max);​

    NT8

    protected override void OnRender(ChartControl chartControl, ChartScale chartScale);

    base.OnRender(chartControl, chartScale);​



    NT7 NT8

    ChartControl.LastBarPainted ChartControl.LastSlotPainted
    ChartControl.BarsPainted ChartControl.SlotsPainted
    ChartControl.MaxMinusMin ???

    base.Displacement ???
    base.BarsRequired ???

    bounds.Y ???
    bounds.Height ChartScale.Height

    override..min ???

    override..max ???



    ???

    #2
    well, it squished the spaces

    NT7------------------------------------------------------------------- NT8

    ChartControl.LastBarPainted ---------------------------------ChartControl.LastSlotPainted
    ChartControl.BarsPainted -------------------------------------ChartControl.SlotsPainted
    ChartControl.MaxMinusMin -----------------------------------???

    base.Displacement ----------------------------------------------???
    base.BarsRequired --------------------------------------------- ???

    bounds.Y -----------------------------------------------------------???
    bounds.Height ----------------------------------------------------ChartScale.Height

    override..min ------------------------------------------------------???
    override..max -----------------------------------------------------???​

    Comment


      #3
      Hello llanqui,

      Nt8 uses a different rendering engine so it will not have some of the same properties. I would highly suggest to read the OnRender documentation if you are trying to do any kind of conversion or creating something new. We have a guide that goes over the commonly used properties and classes with OnRender in the link below. The sub pages like ChartPanel and ChartControl go over the specific rendering properties associated with those classes as well and also have some images to show what each are.



      Comment


        #4
        Ok, are you able to tell me the definition of these NT7 values?

        base.Displacement
        base.BarsRequired

        override..min
        override. max

        or prehaps there is some NT7 documentation where these are listed...there used to be a stand alone PDF file or Help File for NT7.

        I don't have NT7 on my system anymore

        Comment


          #5
          Hello llanqui,

          Displacement still exists, that is only available in indicators and is only used to displace the plots by a number of bars. BarsRequired no longer exists, that has been changed to BarsRequireToTrade or BarsRequireToPlot depending on the type of script. I am not sure which overrie you are referring to, do you mean OnCalculateMinMax?

          The NT7 information is no longer available as that platform has been outdated for some time. I would highly suggest to review the newer documentation for NT8 rather than trying to make an exact copy as the rendering system in NT7 was different and the ways you may approach rendering in NT8 will likely vary.

          Comment


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

            the min and max in this override?

            thx

            Comment


              #7
              Hello llanqui,

              OnRender no longer uses those values, I would not be certain of the equivalent. That depends on what you were using those values for in NT7. The MIN/MAX prices that your script scales on is based on the OnCaclulateMinMax override. If you are looking for panel values you would need to reference the ChartPanel class to get the values for the X/Y/W/H https://ninjatrader.com/support/help...chartpanel.htm

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              599 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              344 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              558 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              557 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X