Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't import indicator with stroke

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

    Can't import indicator with stroke

    Just got called because an indicator wouldn't import. Problem seems to be the Stroke

    PHP Code:
            [NinjaScriptProperty]
            [Display(ResourceType = typeof(Custom.Resource), GroupName="Basic", Name = "... myStroke", Order = 25, Description="")]
            public NinjaTrader.Gui.Stroke myStroke 
            { get; set; } 
    
    PHP Code:
    if (State == State.SetDefaults)
    {
            myStroke = new Stroke() { Brush = Brushes.Black, Width = 2, DashStyleHelper = DashStyleHelper.Dash };
    } 
    
    I can import/export fine...as can the other guys, but the poor tester can't.
    Not sure what I did wrong...

    #2
    Hello,

    Thank you for the question.

    I wanted to check, is this a compiled assembly the tester is using or the source code?

    if possible, I would suggest trying the source code first to see if that can import, in the case it can not that would be easier to manually import to see what errors are being generated.

    In the case this is an assembly, you would likely need to manually import and reference the assembly and then compile to check for errors.

    I look forward to being of further assistance .

    Comment


      #3
      Compiled assembly.... this is the first time we've sent this code to someone other than a developer.

      They imported ...(that is tried to import)....compiled 'AgileNet' secured assemblies just like a 'real user'.

      The person doing the import gets this error...

      Code:
      The type or namespace name 'Stroke' could not be found (are you missing a using directive or an assembly reference?)
      ....almost like this needs to be serialized...(but I thought we were using some Ninja version of 'stroke'
      Last edited by andrew56; 02-02-2016, 11:50 AM.

      Comment


        #4
        Hello,

        Thank you for the reply.

        From my tests I have been unable to reproduce this, can you tell me have you tried testing on the users machine with a un secured DLL to see if this is specific to using agile?

        Without a more specific example or steps I would be unable to reproduce this at this point. I would suggest testing the non protected assembly first to see if this is specifically to do with agile or your code. If it still happens in the protected dll, likely something in the code is causing the problem and would need further debugged.

        I look forward to being of further assistance .

        Comment


          #5
          I don't think you will able to replicate it....because you already have "stroke" and "datetime" working.

          I finally found another thread on the support forum with this same problem. Zachary_G supplied a bit of wisdom for the DateTime but I didn't see anything for Stroke.

          Comment


            #6
            Quick update..... I removed the " [NinjaScriptProperty] " from the 'stroke' properties definitions and and recompiled.
            The tester can now import the code.

            Unless something else pops up with stroke, you can take this off the "waiting for response" list.

            Thanks!!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            672 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            379 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            111 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            575 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            582 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X