Announcement

Collapse
No announcement yet.

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.

    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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        567 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X