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

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 Waxavi, Today, 02:00 AM
      0 responses
      2 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by elirion, Today, 01:36 AM
      0 responses
      4 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by gentlebenthebear, Today, 01:30 AM
      0 responses
      4 views
      0 likes
      Last Post gentlebenthebear  
      Started by samish18, Yesterday, 08:31 AM
      2 responses
      9 views
      0 likes
      Last Post elirion
      by elirion
       
      Started by Mestor, 03-10-2023, 01:50 AM
      16 responses
      391 views
      0 likes
      Last Post z.franck  
      Working...
      X