Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

converting 7 to 8

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

    converting 7 to 8

    I am attempting to code something I placed on the NT7 indicator sharing platform.
    My skills are limited.

    I need the equivalent of

    1. How to find on a bar the high and low y coords
    here is the NT7 equivalent that I produced.


    Code:
    Highy = (bounds.Y + bounds.Height) - ((int (((High[1]- min)/ ChartControl.MaxMinusMin(max,min)) * bonds.Height))-1;
    Any help much appreciated. It may be beyond me to convert but one should at least try!
    Last edited by Mindset; 09-22-2020, 02:33 AM.

    #2
    Hello Mindset,

    Thank you for your post.

    In your code snippet, I see you are using the NinjaTrader 7 ChartControl.MaxMinusMin property to get the difference between the chart scale's MaxValue and MinValue represented as a y value. The MaxMinusMin property in NinjaTrader 8 is now a SharpDX ChartScale property. The SharpDX ChartScale class includes a range of properties related to the Y-Axis values of the ChartPanel on which a script resides. The MaxMinusMin property could be referenced in NinjaTrader 8 like so; chartScale.MaxMinusMin.

    Additionally, the ChartScale GetYByValue() method could be used to return the chart's y-pixel coordinate on the chart determined by a series value represented on the chart scale.

    Please review the help guide links below for learning how to work with SharpDX. The SampleCustomRender script that comes with NinjaTrader may be used alongside the 'Using SharpDX' help guide for learning SharpDX.

    Using SharpDX for Custom Chart Rendering - https://ninjatrader.com/support/help..._rendering.htm

    ChartScale - https://ninjatrader.com/support/help...chartscale.htm

    MaxMinusMin - https://ninjatrader.com/support/help...axminusmin.htm

    GetyByValue - https://ninjatrader.com/support/help...htsub=ybyvalue

    Bars.GetHigh - https://ninjatrader.com/support/help...8/?gethigh.htm

    Bars.GetLow - https://ninjatrader.com/support/help...nt8/getlow.htm

    Please let us know if we may further assist.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Brandon

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by darylxarkley, Today, 12:54 PM
      0 responses
      1 view
      0 likes
      Last Post darylxarkley  
      Started by Taddypole, Today, 12:44 PM
      0 responses
      5 views
      0 likes
      Last Post Taddypole  
      Started by RebeccazDougal, Today, 12:03 PM
      0 responses
      5 views
      0 likes
      Last Post RebeccazDougal  
      Started by wehewwehd, Today, 11:10 AM
      0 responses
      4 views
      0 likes
      Last Post wehewwehd  
      Started by my-trade, Today, 10:45 AM
      0 responses
      8 views
      0 likes
      Last Post my-trade  
      Working...
      X