1 (edited by Popov 2012-07-09 15:39:41)

Topic: Added little automation for FST

Hi.
I would like to share my little contribution, to this excellent project.

I needed to run mulitple FST from cmd line, with strategy and connectionID specified.
So now it`s possible to create a batch file with entries like this:
FST.exe 11 "Test Trade1"
FST.exe 12 "Test Trade2"

FST will load startegy set`s the connection ID, and will wait for Mt4.
When discovered it would automatically start to trade.
(Sorry that`s not a patch, but I`m new with Git)

EDIT by Popov
This automation is included in FST v1.5.1 NB. Download link in this post: http://forexsb.com/forum/topic/3453/fst … tly-build/

Wiki page here: Autostart and Connect Multiple Copies

Post's attachments

autostart.zip 16.92 kb, 53 downloads since 2011-10-25 

You don't have the permssions to download the attachments of this post.

Re: Added little automation for FST

What do the files in autostart.zip do?

Re: Added little automation for FST

That`s the changes to orginal source code.

Re: Added little automation for FST

Very interesting and helpful. Can you call the batch file on startup, for example, to get FST-MT4 running automatically if the machine restarts?

Re: Added little automation for FST

Yes, exactly Krog.
Setup 20 tests systems over and over after some accidental restart, was a real pain for me.

Re: Added little automation for FST

Thanks for the file Acerguest. Good trading to all!

Re: Added little automation for FST

Wish I had searched this out months ago- many thanks acerguest.

Thanks Brian for bringing this back to the top.

Re: Added little automation for FST

Sam M. wrote:

Wish I had searched this out months ago- many thanks acerguest.

Thanks Brian for bringing this back to the top.

From now this is going to be a sticky topic!

Re: Added little automation for FST

I have missed these posts. The automated start of FSB proposed by @acerguest is really helpful.
I'll add it in the core in next release.

Re: Added little automation for FST

Automatic start is integrated in FST v1.5.1 NB. It works via autostart.bat file.
See more details here: http://forexsb.com/forum/post/15368/#p15368

Download link of  FST v1.5.1 NB in this post: http://forexsb.com/forum/topic/3453/fst … tly-build/

We need some documentation of this feature.

Re: Added little automation for FST

Wiki page here: Autostart and Connect Multiple Copies

Re: Added little automation for FST

Hi,
I tested the autostart-feature on
FSTv1.5.3.1NB

If I put more than 5 entrys in the autostart.bat the
FSB-Trader crashes on my laptop. (It start mostly only 4 strategies)
Is my Laptop to slow?

A quick solution for me is to use two autostarts.

Autostart1.bat start the first 5 strategies
Autostart2.bat start the second 5 strategies

thomas

http://www.tradessystem.com/

Re: Added little automation for FST

You are right that starting multiple copies simultaneously on a slower machine can overload it.
It will be better if we could schedule each start 5 sec apart but I don't know the appropriate command for .bat files.
I want (an probably will do) a small GUI programs for starting FST.

Re: Added little automation for FST

Found some workaround of the problem with autostarting several copies of FST on a slow computer.

Since there is no delay command for batch files, we can use side effects of ping command. 

For any MS-DOS or Windows version with a TCP/IP client, PING can be used to delay execution for a number of seconds.
If specified (-w switch), PING will wait for a number of milliseconds between two pings before giving a time-out.

PING 1.1.1.1 -n 1 -w 60000 >NUL
will delay execution of the next command 60 seconds, provided 1.1.1.1 is not a valid IP address.

Quote from: http://www.robvanderwoude.com/wait.php.

We can add PING 1.1.1.1 -n 1 -w 5000 >NUL command between batch file rows in order to achieve 5 seconds delay.

start "" "Forex Strategy Trader.exe"   100   "yes"   "Test Trade"
ping 1.1.1.1 -n 1 -w 5000 >NUL
start "" "Forex Strategy Trader.exe"   110   "yes"   "Test Trade"
ping 1.1.1.1 -n 1 -w 5000 >NUL
start "" "Forex Strategy Trader.exe"   120   "yes"   "Test Trade"
ping 1.1.1.1 -n 1 -w 5000 >NUL
start "" "Forex Strategy Trader.exe"   130   "no"    "Test Trade"
ping 1.1.1.1 -n 1 -w 5000 >NUL
start "" "Forex Strategy Trader.exe"   140   "no"    "Test Trade"

15 (edited by ab 2012-07-17 09:11:27)

Re: Added little automation for FST

Windows (at least the newer versions) have the timeout.exe command included (and available) from the command prompt.  This command can be used to delay a batch file for a set number of seconds and I believe will do what you are trying to achieve, eg:

start "" "Forex Strategy Trader.exe"   100   "yes"   "Test Trade"
timeout 10
start "" "Forex Strategy Trader.exe"   110   "yes"   "Test Trade"
timeout 10
start "" "Forex Strategy Trader.exe"   120   "yes"   "Test Trade"

This command may not be built in to earlier versions of windows by can downloaded for free from http://www.petri.co.il/download_free_reskit_tools.htm.