Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing Objects cannot be used from compiled assemblies

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

    Drawing Objects cannot be used from compiled assemblies

    A defect appears to exist as of build 5 (and at least as far back as build 4) such that drawing objects cannot be used in NinjaScript code that is exported to compiled assemblies. When the resulting assemblies are reimported, the drawing objects to do not appear.

    As a demonstration, a single line of code can be added to OnBarUpdate():

    protected override void OnBarUpdate()
    {
    // demonstrate drawing a trend line
    if (CurrentBar >= 10) Draw.Line(this, "Test", 10, Close[10], 0, Close[0], Brushes.Blue);
    }

    This will keep a trend line from the close ten bars ago to the current bar close and works fine when run from the source code on a test NT8 installation.

    However, if you export this indicator as a compiled assembly (or a protected assembly) and then install that assembly onto the same or any other NT8 installation, the trend line does not appear.

    This is true for compiled assemblies as well as for protected assemblies.

    Plots do not seem to be affected, nor are calculations - the indicator never gives an exception or any log message and all of the calculated values are correct - the only difference is that drawing objects, including trend lines, rays, horizontal and vertical lines, and regions, simply do not appear on the chart in the compiled (or protected) version as they do in the source version. A copy of the demonstration indicator is attached.

    Thank you for your attention to this! Without a platform fix it means other display methods and not drawing objects must be used for any compiled work.
    Attached Files
    Last edited by QuantKey_Bruce; 09-22-2015, 05:31 AM. Reason: additional clarifications and explanation
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    #2
    Hello Bruce,

    Thank you for writing in. I am currently investigating this issue further and will update you as soon as possible.

    Thank you for your continued patience in the meantime.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Hello Bruce,

      I have verified this behavior on my end as well and submitted a bug report.

      I will update this thread with further information from our development team when it becomes available.

      Thank you again for your patience in the meantime.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Thank you.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        32 views
        0 likes
        Last Post ScottWalsh  
        Started by frankthearm, Today, 09:08 AM
        10 responses
        36 views
        0 likes
        Last Post frankthearm  
        Started by mmenigma, Today, 02:22 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NRITV, Today, 01:15 PM
        2 responses
        10 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Working...
        X