• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sample connection adapter

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

    Sample connection adapter

    deleted by user
    Last edited by jshapen; 04-29-2018, 12:31 PM.

    #2
    Hello jshapen,

    Thanks for opening the thread.

    I know it doesn't support, but if you can help me...
    This is true. We don't have any documentation on connection adapters or support creating your own so there isn't any further direction I could offer.

    People have been able to use the External Data Feed in conjunction with the DLL interface to connect to unsupported connections for market data. You may reference the DLL interface documentation as well as the example linked below. These are all the resources we have available for this feature and support is very limited since the DLL interface is provided as-is.

    DLL interface - https://ninjatrader.com/support/help..._interface.htm

    Example program - https://ninjatrader.com/support/foru...442#post514442

    I'll leave this thread open ended in case another member of the forums would like to share their input.
    Last edited by NinjaTrader_Jim; 02-28-2018, 08:37 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      This is the foundation of a connection

      Code:
      public class AdapterConnectOptions : CustomConnectOptions
          {
              [Browsable(false)]
              public override Type AdapterClassType
              {
                  get { return typeof(NinjaTraderAdapter); }
              }
      
              public AdapterConnectOptions()
              {
                  base.Provider = (Provider)1000;
              }
          }
      
          public class NinjaTraderAdapter : AdapterBase, IAdapter, IDisposable
          {
              void IAdapter.Cancel(Order[] orders)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.Change(Order[] orders)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.Connect(IConnection connection)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.Disconnect()
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.RequestBars(IBars bars, Action<IBars, ErrorCode, string> callback, IProgress progress)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.RequestHotlistNames(Action<string[], ErrorCode, string> callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.ResolveInstrument(Instrument instrument, Action<Instrument, ErrorCode, string> callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.Submit(Order[] orders)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeAccount(Account account)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeFundamentalData(Instrument instrument, Action<FundamentalDataType, object> callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeHotlist(Hotlist hotlist, Action callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeMarketData(Instrument instrument, Action<MarketDataType, double, long, DateTime, long> callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeMarketDepth(Instrument instrument, Action<int, string, Operation, MarketDataType, double, long, DateTime> callback)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.SubscribeNews()
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeAccount(Account account)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeFundamentalData(Instrument instrument)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeHotlist(Hotlist hotlist)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeMarketData(Instrument instrument)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeMarketDepth(Instrument instrument)
              {
                  throw new NotImplementedException();
              }
      
              void IAdapter.UnsubscribeNews()
              {
                  throw new NotImplementedException();
              }
      
              public void Dispose()
              {
                  throw new NotImplementedException();
              }
          }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Botan626, Today, 04:43 AM
      0 responses
      4 views
      0 likes
      Last Post Botan626  
      Started by xsgex, Yesterday, 09:46 PM
      0 responses
      3 views
      0 likes
      Last Post xsgex
      by xsgex
       
      Started by Steve L, Yesterday, 09:36 PM
      0 responses
      6 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Started by krugman25, Yesterday, 09:34 PM
      0 responses
      4 views
      0 likes
      Last Post krugman25  
      Started by indy73, Yesterday, 04:42 PM
      0 responses
      15 views
      0 likes
      Last Post indy73
      by indy73
       
      Working...
      X