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 TraderG23, 12-08-2023, 07:56 AM
        9 responses
        382 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Yesterday, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X