Before run .NET Gateway console application you have to set up Gateway.exe.config file. It is default .NET application configuration file, so if you need additional configuration sections for you custom .NET Experts you can configure them here.

<Logging enabled="false" /> - enables logging for particular instance of .NET Gateway. If enabled, Errors will be logged to Windows Event Logger. Note: .NET Gateway must be run as administrator in order to use this function.

<TCPServer ipAddress="127.0.0.1" port="2007" /> - defines which communication host will used for particular instance of .NET Gateway.

<Application applicationName="TestsScript" className="TradePlatform.MT4.Model.Scripts.TestScript" assemblyName="TradePlatform.MT4.Model" /> - defines .NET ExpertAdvisor classes available for particular .NET Gateway instance. 'applicationName' argument should be unique for every 'Application' tag. Defined assembly must be placed in same directory as Gateway.exe file.

<Parameter propertyName="TestProperty" propertyValue="TestValue" /> - defines .NET ExpertAdvisor property values. Properties must be 'public instance'.

<connectionStrings>
    <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_DATABASE]integrated security=True;connect timeout=30;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings> - defined database connection string for TradePlatform Data Entity model.

Gateway.exe.config also contains connection strings section which configures .NET MT4 SDK Entity Data Model and default SMTP server settings.

Last edited Sep 24, 2012 at 12:53 PM by vladkalos, version 6

Comments

No comments yet.