This project is read-only.

Configuration section description

The application which hosts .NET Bridge (.NET Shell or your custom application) should have dedicated configuration section. to declare .NET Bridge configuration section you have to add this to your configuration file:

    <section name="BridgeConfiguration" type="TradePlatform.MT4.Core.Config.BridgeConfiguration, TradePlatform.MT4.Core"/>

and the section itself should be like following:


<BridgeConfiguration useEventLog="true" wcfBaseAddress="http://localhost:8080/TradePlatform">
      <Host name="host1" ipAddress="" port="2007">
          <Handler name="handlerName" typeName="fullClassName" assemblyName="assemblyName">
              <Parameter propertyName="propertyName" propertyValue="propertyValue" />
  • useEventLog - when true application will log errors to Windows Event Log (application should have administrator rights in this case)
  • wcfBaseAddress - base address of WCF host used by _.NET Bridge_. Not really important, you can use basically any address.
  • Host - describes particular host configuration. It should have name, ip address and port number
  • Handler - Particular handler available for host. Should have a name and type resolving information.
  • Parameter - in case you have input parameter in your _.NET ExpertAdvisor_ you can set up it by this node.


More configuration parameters

Application configuration file should have more configuration for proper work

Mail setting section can be used to define default for SmtpClient class:

      <smtp deliveryMethod="Network" from="[FROM_ADDRESS]">
        <network host="" userName="[GMAIL_LOGIN]" password="[GMAIL_PASS]" port="587" enableSsl="true"/>

Connection string which used by TradePlatform Entity model:

    <add name="TradePlatformEntities" connectionString="metadata=res://*/TradePlatformModel.csdl|res://*/TradePlatformModel.ssdl|res://*/TradePlatformModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\v11.0;attachdbfilename=[PATH_TO_MDF_FILE];integrated security=True;connect timeout=30;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>

Trace listener configuration:

    <trace autoflush="false" indentsize="4">
        <remove name="Default" />
        <add name="consoleListener" type="TradePlatform.MT4.Core.Utils.ConsoleBridgeTraceListener, TradePlatform.MT4.Core" />

WCF endpoints configuration:

      <service name="TradePlatform.MT4.Data.TradePlatformDataService">
        <endpoint address="http://localhost:9000/TradePlatform/svc" binding="webHttpBinding" contract="System.Data.Services.IRequestHandler" />

Last edited Nov 5, 2012 at 3:19 PM by vladkalos, version 1


JeanSebastien Jul 3, 2013 at 9:05 PM 
I added the BridgeConfiguration section to my file but I get the following error : "sectionCould not find schema information for the element BridgeConfiguration". It seems I am missing a schema file?