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

Adding Reference

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

    Adding Reference

    I'm trying to use an indicator to host a WCF service; I'm not sure if this is even possible, but I am giving it a go. To do this I need to add the reference System.ServiceModel, but there seems to be no way to add a reference in the Ninja compiler.

    is there a way to do it outside Ninja, and then compile it in Ninja?

    Also, what .NET framework is being used? Can I compile using the .NET framework of my choice? could I use 4.5?

    Thanks,
    Will.

    Oh, and if anyone has a better way to communicate with an indicator from an external program (I want to set and read ninja static variables to change the behaviour of my indicator while its running) I would appreciate some suggestions.
    Last edited by dontpanic; 01-26-2013, 12:33 AM.

    #2
    Will / dontpanic, NT would use .NET 3.5 and this would need to be the target for custom references as well - you can add references via right click in the NinjaScript Editor.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      found the reference

      Thanks, that worked. I was able to create a WCF service by hosting it in the indicator. I'm wondering if this is the best place to host it, but I can't see any other way of doing it.

      the question I have now is do I need to create the service (on a different port) in each open chart or can I just have the service running in 1 chart, and from there communicate to the other charts. The obvious way to do this is to create static variables but I'm not sure if static variables are accessible across charts.

      Is there another better method that one chart can communicate to another?

      Thanks again,
      Will.

      Comment


        #4
        Glad to hear Will, would unfortunately not have specifics to share on how to work with the C# WCF - I know though board members have worked successfully with public static variables to cross communicate for strategies.

        Depending on which values you would try to exchange, for indicator I would rather suggest looking into exposing the info needed directly - http://www.ninjatrader.com/support/f...ead.php?t=4991
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by junkone, Today, 11:37 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by frankthearm, Yesterday, 09:08 AM
        11 responses
        41 views
        0 likes
        Last Post frankthearm  
        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
        34 views
        0 likes
        Last Post love2code2trade  
        Working...
        X