forex software

Create and Test Forex Strategies


fsbpro_guide:connecting_mt4_chart

Connecting to a MT4 Chart

Forex Strategy Builder Professional trades strategies via MetaTrader 4 by using an expert advisor named FSB-MT4 Bridge.

The FSB-MT4 Bridge is normally installed during the installation of Forex Strategy Builder Professional. If you cannot find it among the other experts in MT4, you have to reinstall it either automatically or manually. See these articles for more info:

FSB-MT4 Bridge Options

Before you can use the expert for the first time you have to make two changes in the MetaTrader 4 settings:

  1. Open Expert Advisors tab in Options dialog from Tools → Options.
  2. Check on Allow automatic trading and Allow DLL import… options.

MetaTrader 4 Expert Settings

MetaTrader executes an expert when it is attached on a particular chart. You can open the desired chart and drag the expert from the experts list to the chart. You can also double click on the expert and it will be opened on the currently open chart.

When you open the expert, MT displays an Expert options dialog window. At the first time you run our expert you have to check the option in Common tab.

Make sure that the following options are chosen:

  1. Long & Short positions
  2. Allow live trading
  3. Allow DLL imports

FSB-MT4 Bridge Common options

The settings shown above are more or less constant. You should not change them again in normal conditions. However, there is one more parameter that has to be set every time you connect a FSB Pro strategy to a MT4 chart - Connection_Id.

Click on the Input tab on the Expert options window and you'll see a table with the expert's external parameters you can change.

Connection_Id is the first parameter. It accepts an integer number between 0 and 100000. Connection_Id must be an unique number for each chart. You set the same number also in the FSB Pro connection. The program uses Connection_Id to recognize to which chart to connect. In that way you can connect a single FSB Pro strategy to several charts or several strategies to different charts.

Connection_Id is a number from 0 to 100000. It must be must be unique for each chart, even if you use different MetaTrader terminals or FSB Pro running copies.

Connection ID

When you enter the Connection_Id close the options window. The expert will check the environment and will show status message on the upper left corner of the chart. You can also check the output in the MT4 Terminal - Experts tab.

Do not forget to turn on the “AutoTrading” button at the middle of the MT4 toolbar. Check also if the expert shows a smile at the upper right corner of the chart.

Open FSB Professional Connection

When you have MT4-FST Expert attached to a MetaTrader chart, you have to set the same Connection Id number you used before in Forex Strategy Builder Professional connection.

Each strategy in FSB Pro uses one or more connections. For a sake of example, open the provided Demo Trading strategy. Chose Trader option from the drop-down box at the top of the left side navigation menu. FSB Pro will open the Auto Trader page.

Set the same Connection ID number as in the expert and hit Enter (or use the small arrow button next to the connection text box). FSB Pro will open a new connection and will display a rectangle with the connection details.

If everything is OK, both programs will start exchanging market and account info. You'll see that the price in the connection panel will correspond to the price on the MT chart. The Connection Status log bellow the connection field will show the chart to which FSB Professional is connected.

Open FSB Professional Connection