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

Conversion NT 7 - NT 8

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

    Conversion NT 7 - NT 8

    Hi,
    any idea, how to convert this code from N7T 7 - NT 8:

    NT7:
    double end_bar_double = (double)typeof(ChartLine).GetProperty("endBarDoubl e",BindingFlags.NonPublic | BindingFlags.Instance).GetValue(drawing_object,nul l);
    double start_bar_double = (double)typeof(ChartLine).GetProperty("startBarDou ble",BindingFlags.NonPublic | BindingFlags.Instance).GetValue(drawing_object,nul l);


    Thanks

    #2
    Hello t_r_a_d_e_r,

    Thank you for your post.

    I see you are using System.Reflection (GetProperties, GetValue) as well as ChartLine (undocumented/unsupported NT7 code) in your snippet which would go beyond the scope of what we are able to provide support for.

    Assuming that ChartLine is a line on the chart or line drawing object, you could use Line which is supported in NinjaTrader 8 to create line drawing objects.

    Please review the help guide link below for more information about Line.

    Line - https://ninjatrader.com/support/help.../nt8/?line.htm

    If you require further assistance, please provide a description explaining what your code snippet is specifically being used for.

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

    Comment


      #3
      I need find start and end bar of manually drawn Line

      NT 7:
      end_bar_double 6735
      start_bar_double 6801
      y1 1,16462657644686
      y2 1,16541817720818
      time1 25. 9. 2020 22:18:00
      time2 25. 9. 2020 21:12:00

      NT 8:
      start_bar_double -2147483648
      end_bar_double -2147483648
      y1 1,16424945541023
      y2 1,16432162187872
      time1 25. 9. 2020 22:00:00
      time2 25. 9. 2020 22:16:00

      Comment


        #4
        Hello t_r_a_d_e_r,

        Thank you for that information.

        You could see the start and end points of a manually drawn line by looping through the drawing object collection to find specific draw objects and print StartAnchor.SlotIndex and EndAnchor.SlotIndex to see the start and end values of the manually drawn line.

        Please see the last example in the help guide linked below which demonstrates how this may be accomplished.

        DrawObjects - https://ninjatrader.com/support/help...rawobjects.htm

        You may also reference the attached script that demonstrates this.

        Let us know if we may further assist.
        Attached Files
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        22 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        16 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Working...
        X