forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Express Generator → How to get ExpressGenerator to run with Test.cmd file

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 12

1 (edited by Alann 2023-09-12 12:26:15)

Topic: How to get ExpressGenerator to run with Test.cmd file

When I put the following in a command prompt it will collect strategies:

C:\ExpressGenerator - majors\EG_EURUSD & Step11_Run_ExpressGenerator.cmd

However, when I put the following in a Test.cmd file and the Test.cmd file is on my Desktop it will not run:

start cd C:\"ExpressGenerator - majors\EG_EURUSD & Step11_Run_ExpressGenerator.cmd"

Re: How to get ExpressGenerator to run with Test.cmd file

Try renaming the folder so there's no space in the name, and then you won't have to use quotes on the start command. Quotes don't get passed well without double quotes and other ridiculousness with nested commands like that. ;-)

Re: How to get ExpressGenerator to run with Test.cmd file

Same result.

4 (edited by aaronpriest 2023-09-12 02:42:56)

Re: How to get ExpressGenerator to run with Test.cmd file

Spaces, ampersands, and other special characters (like & or %, etc.) don't do well with shell commands, especially when calling one batch file from another. Hyphen and underscore are usually OK (- and _). I'd remove all of those and try again with some simple folder and file names. Also, remove the cd as you don't need to change directories to call a batch file from a folder with a start command.

For example, mine looks like this:
start C:\express-generator\generate.cmd

5 (edited by Alann 2023-09-12 06:00:00)

Re: How to get ExpressGenerator to run with Test.cmd file

When I create a short-cut it will run.

Target: "C:\ExpressGenerator - Majors\EG_EURUSD\Step11_Run_ExpressGenerator.cmd"
Start in: "C:\ExpressGenerator - Majors\EG_EURUSD"

When I put the following in my test.cmd file it will not run:

start  "C:\ExpressGenerator - Majors\EG_EURUSD\Step11_Run_ExpressGenerator.cmd"

6 (edited by aaronpriest 2023-09-12 09:41:34)

Re: How to get ExpressGenerator to run with Test.cmd file

It works for me when I don't use spaces or quotes. A shortcut can use quotes, but to use them on a nested command line (one .cmd starting another .cmd) probably requires double quotes to pass it properly to the next environment, or change the names to avoid using quotes altogether, which means no spaces or certain characters like %, &, etc.

Re: How to get ExpressGenerator to run with Test.cmd file

I am trying to get it to work when I have my test.cmd file located on my desktop.  Does your work from the desktop?

Re: How to get ExpressGenerator to run with Test.cmd file

My .cmd file is in my C:\express-generator\ folder. But I've created a shortcut to that .cmd file.

Re: How to get ExpressGenerator to run with Test.cmd file

> I am trying to get it to work when I have my test.cmd

The easiest way to run Express Generator is to have your CMD file in its directory.

I have tried to run it from a different directory, but I have used Powershell or JavaScript scripts because it is possible to set the "current working directory" for the new process to the Express Generator's directory.

10 (edited by Alann 2023-09-12 16:54:38)

Re: How to get ExpressGenerator to run with Test.cmd file

Maybe I am going about this in the wrong way.  What I was hoping if I could get task.cmd to work then maybe I could get Task Scheduler to work so I could automatically start all my expressgenerators at one time so I could automatically collect strategies for all my chosen currency pairs late on Friday night.  So my question is there another way to do this such as is there a way to schedule a time and day to start expressgenerator in power shell or command prompt that can be written in a windows file and be able to automatically run?

Re: How to get ExpressGenerator to run with Test.cmd file

Alann wrote:

Maybe I am going about this in the wrong way.  What I was hoping if I could get task.cmd to work then maybe I could get Task Scheduler to work so I could automatically start all my expressgenerators at one time so I could automatically collect strategies for all my chosen currency pairs late on Friday night.  So my question is there another way to do this such as is there a way to schedule a time and day to start expressgenerator in power shell or command prompt that can be written in a windows file and be able to automatically run?

Absolutely, I do the same, but my starting .cmd file and the file I reference via start are both in the same C:\express-generator\ folder. And then I reference that file in my task scheduler.

12 (edited by Alann 2023-09-12 22:45:01)

Re: How to get ExpressGenerator to run with Test.cmd file

I finally got it working in Task Scheduler!

Posts: 12

Pages 1

You must login or register to post a reply

Forex Software → Express Generator → How to get ExpressGenerator to run with Test.cmd file

Similar topics in this forum