Topic: Removing Connection ID

I want to remove connection ID from FST and the Expert.

My idea is:
- Expert to generate an unique ID at starting. It will include: TerminalName, Symbol, Period, TimeStamp
- FST will periodically read available experts and will provide a list for choosing to what ID to connect.
- After connection, the ID will be marked as connected and will not be available for the next FST instances.

Any ideas?

Re: Removing Connection ID

Making connection easy is an excellent idea and has my support.
How would it cope if we were running two MT4 accounts on the same PC?
Thanks
Mick

3 (edited by ab 2012-05-24 14:01:45)

Re: Removing Connection ID

I've been looking into this issue for a while (and we have discussed ideas before) and have been researching a number of ideas over the last few weeks.

Ideally, I would like to see FST dropped entirely and replaced with a method of building the entire trading strategy for MT4 directly in FSB.  The user-side process would be to build a strategy in FSB, go through the standard processes to a point where it would be ready for use in FST, and then 'deploy' to MT4.

The 'deploy' process would dynamically create a DLL containing the current strategy, and the custom indicators.  This 'strategy DLL' would be a C# .NET DLL (so we can compile directly from within the app), but it would contain a number of special marshalling and export features that would allow it to be called directly from MT4 (or another platform that doesn't natively managed code).

When the strategy DLL is called from MT4, it would need a way to perform indicator and trade logic calculations that are currently performed by FST.  These methods would be available in a 'common DLL' that is used by all the strategy DLL's running on the system.  The common DLL would contain a number of the 'core' FSB/FST features that would be migrated out of the application and into a class library project that is used by any strategy DLL files, and also by FSB.

We would call the strategy DLL from a MT4 EA that contains all the necessary settings that can currently be modificatied in FST (eg. lot sizing, protection, bar closing advance time, etc) or MT4 (magic number, failsafe stops, etc) so a user could change these on a strategy-by-strategy basis.

The benefits of this approach would be that there would be no need to maintain FST or the FST-Library, there is no need to run a full application on the machine with MT4 (so no memory issues related to UI in FST as there isn't one), no need to set a connection id, no requirement to setup a connection from MT4 into another application, and the support of other platforms (such as MT5) should be a lot simpler as there would be no need to migrate anything but the order entry code to a new platform. 

Building this functionality would allow users to be able to run a large number of concurrent strategies on the same system.

It would probably also be possible to perform a platform-side backtest using FSB logic via the DLL, although I have not really looked into this.

Technically this is all possible (calling C# directly from MT4 without wrapper DLL's or similar) although it really depends on the general user community to decide if moving down this path of a non-FST style approach is worth the effort.  I'd be happy to do the FSB work needed to build the DLL in a way that can be called from MT4, but I believe that there would be a considerable amount of work needed to separate the necessary indicator and logic components out of FSB (or FST) and into a central DLL.

My feeling is that the initial effort would pay off in reduced maintenance overhead in the longer term (one FSB project to maintain instead of FSB + FST + FST-Library).

ab

4 (edited by jgp 2012-05-24 17:10:53)

Re: Removing Connection ID

Speaking of MT5, are we in the US going to be able to continue to use MT4 [and FSB-FST] for the forseeable future???  Or is there some date in the near future where all US brokers [such as FXCM and Alpari (US)] will be required to shift to MT5??? And I also wish to express concern about changes to FSB-FST-AE that will not allow the same generated strategy to be used [with different ID/Magic numbers of course] on more than one MT4 Live and or Demo platform running on the same PC at the same time.

5

Re: Removing Connection ID

jgp wrote:

... I also wish to express concern about changes to FSB-FST-AE that will not allow the same generated strategy to be used [with different ID/Magic numbers of course] on more than one MT4 Live and or Demo platform running on the same PC at the same time.

What do you mean exactly?  Is this an existing issue that you would like to have sorted out, or a potential issue that you see occuring as a result of any changes?

Re: Removing Connection ID

"Making connection easy is an excellent idea and has my support.
How would it cope if we were running two MT4 accounts on the same PC?
Thanks
Mick"

See earlier comment in this thread by "Mick".  No, it doesn't seem to be a problem now, and "Mick", "jgp" and perhaps others hope it won't be in future.

7 (edited by ab 2012-05-25 00:02:16)

Re: Removing Connection ID

To clarify ...

My guess would be that this method of using DLLs would not be thread-safe so each strategy that goes through the 'deploy' process could be used once per machine, but as each strategy would be completely isolated from others:

  • Multiple different strategies could be used (same MT4 or different MT4) on the same PC.

  • If there was a need to use the same FSB strategy more than once on the same PC, then the strategy would need to go through the 'deploy' exercise twice (eg. instead of deploying as MyStrat.dll, the same FSB strategy would be deployed as MyStrat1.dll and MyStrat2.dll - allowing the same strategy to be called by two different MT4 charts, or two different MT4 instances).

Re: Removing Connection ID

To clarify; to the simple-minded like jgp, the present separable FSB-FST-AE system seems to be working just fine on multiple MT4 platforms, even when running at the same time on the same computer. Incredible achievement!  Incredible system! Why change it?  What terrible problem with the current separable FSB-FST-AE system are you attempting to fix??

9

Re: Removing Connection ID

The current process works very well and FSB/FST is a brilliant platform, although there are some complexities around the need to set connection id's that started this thread.

I would personally like a way to have my settings across multiple strategies remembered after a system restart, rather than opening up a number of copies of FST, copies of MT4, re-loading the strategies, and connecting MT4 with the appropriate connection id.  This process gets more and more complex with the addition of more strategies to a portfolio.

There are also a number of forum threads discussing issues with the FST client running multiple times for multiple strategies (one copy of FST = one running MT4 expert).  While this is not an issue for everyone, users of the software who are working with low-memory systems (ie. virtual private servers) cannot run more than a couple of strategies at a time.

At no stage did I (or anyone that I am aware of) mention any type of 'terrible problem', although please remember that my comments were in response to a request for ideas from the founder of FSB posted on the developers forum.

10

Re: Removing Connection ID

AB wrote "I would personally like a way to have my settings across multiple strategies remembered after a system restart, rather than opening up a number of copies of FST, copies of MT4, re-loading the strategies, and connecting MT4 with the appropriate connection id.  This process gets more and more complex with the addition of more strategies to a portfolio."
---- jgp is in total agreement!  don't know if that's a terrible problem, but not having to go through all that would be a Very Good Thing.  As for my concerns, put them down to my ignorance of ancient Greek.

Re: Removing Connection ID

I think on improving FST for long time, but still not have enough inspiration to start working on it.
Generally my thoughts are to make a tabbed UI for FST, one tab for each strategy. This will allow one copy of FST to trade multiple strategies. Also all tabs, strategies, and their IDs will be saved to a config file with something like save / restore previous session.
GUI load will be low since only one copy of FST will run with one balance chart and journal. One strategy editor will be used for all trading tabs.

Main problem for doing this is how to separate FST-MT communication in different threads so one strategy's trade request to not disturb the other.

ID numbers will be leaved like this until finding better solution. One possibilities is FST to provide a list of running experts and each strategy to be attached to one of them.

I hope to start working on this new version from 1st of June. I'll be online since the end of August so we have to figure out some solution till then.

Re: Removing Connection ID

Just a thought but when connected FST states "connected to EURUSD M5" so FST must receive this info from MT. Therefore could the pair and time frame be converted to be the ID number which is auto generated when connecting, you could then trade using the same pair but in different time frames!

Re: Removing Connection ID

Jagmanmick wrote:

Just a thought but when connected FST states "connected to EURUSD M5" so FST must receive this info from MT. Therefore could the pair and time frame be converted to be the ID number which is auto generated when connecting, you could then trade using the same pair but in different time frames!

What if you start other strategy on other chart of same symbol & period?

Re: Removing Connection ID

Unfortunately if you want to trade two strategies on the same pair and time frame then that idea wouldn't work, unless there is some way of numbering the charts and including that in the ID number with the pair and time frame.

Re: Removing Connection ID

"numbering the charts" seems a good and easy idea to drop confusion.

MT4 use predefined timeframed charts, but ignore other types charting like Points & Figures, renko, based ticks short timed candles like 5s or 15s. Could this be added with FSB/FST ?

Re: Removing Connection ID

Dear Mr. Popov. I have concern on removing ID, but I am not sure if its a problem. I am Today Running many strategies in the same account, same instrument and same timeframe, and my only way to follow how well the strategies are doing for real is to give one strategy one uniqe ID which also becomes Magic which I can follow in the comment line in history and also through Myfxbook. I am not shure how this will work with automatic settings.

17

Re: Removing Connection ID

zpoken,

I believe that the intention is to remove some of the complexity involved in setting the connection id within FST, although there always needs to be a magic number to MT4 to work in the way that you are using it.  Possibly just merging the two numbers into a single number (so the magic number = connection id / connection id = magic number) would simplify this by only needing the user to enter a single number.

ab