Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug 10.09.2018

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

    Bug 10.09.2018

    Hi NT guys.
    I have submited (1964874) this but at NT email support, but unfortunately i've been dissapointed with the support i got. Many respects to the person i talked with(he has helped me many times on forum), but i think there could be someone other NT guy who might anknowledge the customer-issue realistically, without ignorance.
    ( i have been answered the same answer, that i should reference the .dll in scripts, however I've mailed 3 times, telling that was not problem and have provided 100% proofs, but ... that that made me to think that my submission wasnt analyzed or ignored or i dont know.).

    This issue is important for me, otherwise i might have ignored this problem. so, I kindly please that someone other person from NT take attention to this bug.

    this is the issue (and after you read this, please, tell me , was that hard to follow or to anknowledge? ):



    1) import the "example-package-working" (also, please, see the simplest source code of the `addon1` and `aa1` indicator).
    2) attach "aa1" indicator on chart. You will see the two messagest:
    -`indi` variable assigned
    - indi is OK

    3) go to NS Editor, and then exclude "aa1" from compilation.

    4) export "addon1" as "Compiled assembly" (with or without protection, doesnt matter).

    5) go to NS Editor, and exclude "addon1" from compilation.

    6) import the compiled "addon1".

    7) include "aa1" in compilation from NS editor again.

    8) add "aa1" indicator on chart. you will see the issue - you will get different messages:
    -`indi` variable assigned
    - indi is NULL! ! ! WHY! <------


    Once again, many respects to the support guy, but just i really want that someone other checked this issue realistically.
    Attached Files
    Last edited by ttodua; 09-11-2018, 10:19 AM.

    #2
    Hello TazoTodua,

    Thank you for your post.

    I am reviewing your cases and I will follow up here shortly.

    Comment


      #3
      thanks! hope everything is clear. i provided whatever i could.
      note,that is example for INDICATOR. same happens with strategy.
      Last edited by ttodua; 09-11-2018, 10:53 AM.

      Comment


        #4
        Hello TazoTodua,

        Thank you for your response.

        Your detail is clear and I am investigating your Add On piece of the matter. To be clear; the approach you are taking is not the recommended approach but does in fact work in some tested cases. With that said I will be investigating this further and following up here when I have details for you.

        I look forward to assisting you further.

        Comment


          #5
          Hello TazoTodua,

          Thank you for your patience.

          You are casting Types that will exist in both your DLL and NinjaTrader's Custom.dll assembly. You need to use the dynamic type.
          For example:
          Code:
          		private dynamic NS;
          		private dynamic indi;
          This is detailed in our "Considerations For Compiled Assemblies" document in the NinjaTrader 8 Help Guide at the following link: https://ninjatrader.com/support/help...assemblies.htm

          Please let me know if you have any questions.

          Comment


            #6
            thank you so much Patrick.

            some questions:
            1) have you been able to reproduce the different behavior as i described?

            2) can you tell me two words, why in the same cycle, immediately after this code in addon:

            Code:
            indi = NS as ...Indicator;
            indi != null check hasnt evaluated as TRUE, while called from .dll? isn't that interesting?


            3) can you please do us a favour? i've read the doc page about compiled assemblies and i am very worried.
            As opposed to your simpler solution (just changing the "dynamic" keyword), there is written a harder way (typecsting, assembly and reflection calls to achieve that). If your simpler solution is correct, maybe you can simplify the doc page too? (however, i tried to set "dynamic" keyword, but still get the same issue. did you test it ?)

            In none of the other platforms, when protecting the code, you dont have to recode your scripts. I dont know why NT Devs couldnt solve the problem easier...
            I am sure, not only me, but many NT programmers wish that NT made that problem solved somehow. The problem is outlined in doc page:

            An obstacle arises with traditional typecasting in a compiled assembly, since the NinjaScript Type you attempt to cast will be present in both your DLL and NinjaTrader's Custom.dll assembly

            and why obsacle arises in that case? Maybe NT devs are smart enough to make some workaround (like, load custom assemblies later then NT custom.dll assembly or...) and we wouldnt have to recode your indicators second time? please, send a feature request for us. (btw, might this will help to your devs - https://stackoverflow.com/a/23445878/2377343 ? )
            Last edited by ttodua; 09-12-2018, 02:23 AM.

            Comment


              #7
              Hello TazoTodua,

              Thank you for your response.

              I should of been more explicit in my detail to you. Attached is the 'addon1' that will work when exported as a .dll and utilized by the indicator. Note the changes I have made below:
              • Line 33: private dynamic indi;
              • Line 41: indi = NS_;

              I will forward your request to our development team.
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by inanazsocial, Today, 01:15 AM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by rocketman7, Today, 02:12 AM
              0 responses
              6 views
              0 likes
              Last Post rocketman7  
              Started by dustydbayer, Today, 01:59 AM
              0 responses
              1 view
              0 likes
              Last Post dustydbayer  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              5 responses
              23 views
              0 likes
              Last Post trilliantrader  
              Started by Davidtowleii, Today, 12:15 AM
              0 responses
              3 views
              0 likes
              Last Post Davidtowleii  
              Working...
              X