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

namespace question

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

    #16
    Hello, All is fine with the DLL i build outside on ninjatrader and running fine. I have an indicator i need to build and create in ninja in order for it to generate the required ninjascript code. This indicator i want to use to access and be able to be used in a strategy/indicator wizard. In your post #6 above you removed the parts that will not compile outside of Ninja in visual studio project.

    I had this working before i removed ninjatrader.custom project from my solution. .Now that it is removed i see it doesnt belong there and has cleaned up a few other issues.

    As soon as i include a reference to my custom DLL in the ninjaeditor ... my custom indicator compiles which references some utilities in my DLL but it brings up again the ADL.cs error exactly as above.

    I then exclude from compilation in ninjaeditor my custom indicator and then remove the reference and all is ok. So i am down to one instance here. Any ideas and is there i way that i can do this outside of ninja and still have the code segments generated in order for this to be called in strategy/indicator/market analyser?

    I was going to take this offline but thought this part i would ask here

    thanks

    Comment


      #17
      Hello,

      Thank you for the reply.

      In the case where you are building an indicator outside of the platform, the platform would not generate the NinjaScript generated code region. This is the reason in post #6 I had mentioned I had to modify that to allow it to compile, in that situation ideally you would remove the generated code or modify it to compile. This does not, however, allow you to use this item in the wizard or other areas programmatically.

      If you need to access the item from Strategies, you should instead use the NinjaTrader.Custom project and NinjaScript editor so that the code can be generated. If you want to use Visual Studio, you still can, you would just use the toolbar button to launch the NinjaTrader.Custom project from the NinjaScript editor and then edit the script from visual studio.

      This would bring me to a question, what reason do you need to create a second visual studio solution for the indicator?

      If you are using an external visual studio project separate from NinjaTrader.Custom, the partial class logic that is used in the NinjaTrader.Custom project (caching, Draw. methods etc) cannot be shared as All partial-type definitions meant to be parts of the same type must be defined in the same assembly.


      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #18
        Hello, thanks for reply - i understand what you are saying and as i stated i already had a version working in the ninjaeditor in order to have the Ninjascript generated code.

        I dont need to create a second visual studio instance i was trying to outline the problems with the referencing and the compile which you dont seem to have addressed.

        I am going to take this offline and email the support email directly and reference this and your name; as there are aspects on this now i dont want to discuss here - i did this so far for the benefit of other users.
        So we will continue this offline - see you there
        thanks
        Last edited by soulfx; 12-04-2017, 04:00 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by frankthearm, Yesterday, 09:08 AM
        12 responses
        43 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by junkone, Today, 11:37 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by quantismo, 04-17-2024, 05:13 PM
        5 responses
        35 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by proptrade13, Today, 11:06 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        35 views
        0 likes
        Last Post love2code2trade  
        Working...
        X