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 wjadevries, Yesterday, 04:18 PM
      17 responses
      59 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by chaitunt, Today, 10:33 AM
      0 responses
      2 views
      0 likes
      Last Post chaitunt  
      Started by UltraNIX, Today, 10:00 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by stewarco, Today, 10:14 AM
      0 responses
      6 views
      0 likes
      Last Post stewarco  
      Started by Newtrader101, Today, 06:36 AM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Spencer  
      Working...
      X