Topic: Mac Users

Do any Mac users know what file types to use to get express gen workflows to launch in the terminal?

.sh hasn't worked for me.

2 (edited by timelleston 2022-11-10 08:13:31)

Re: Mac Users

Yes, I'm a mac user and I'm using .sh and it's working fine for me.

Have you made the .sh file executable by using chmod 755 from the terminal window?

chmod 755 yourfile.sh

And then you should be able to execute it with:

./yourfile.sh

My generate.sh script is as follows:

/usr/local/bin/node ./bin/fetch --settings ./my-fetch.ini
/usr/local/bin/node ./bin/gen --settings ./my-settings.ini

And I can run it manually through the Terminal as: ./generate.sh, although I'm using a combination of scripts within MT5 to export live data at a specific point, and then another script to copy it to my express-generator folder structure, then when that changes, it kicks off the generate.sh script.

Re: Mac Users

If you install PowerShell on your Mac, you will have a similar behaviour as in the tutorial videos.

Re: Mac Users

I'll try this and see if I have any additional questions!

Thanks for the help smile

Re: Mac Users

when running my script I get the following error.


: command not found 8:
./workflow.sh: line 9: TITLE: command not found
: command not found 10:
./workflow.sh: line 174: syntax error: unexpected end of file


I think I've narrowed it down to the workflow.sh file not liking my %variables.

First lines of my script code below.

set symbol=%1
set period=%2
set bars=%3
set spread=%4
set swaplong=%5
set swapshort=%6
set instance=%7

TITLE %symbol% %period% %instance%

if %symbol% == "" exit

The last line of my script, 174, says timeout 2



The idea is to run the script with a workflow running program that sets those variables for the different currency pairs.

My work flow running code look like this.

start workflow USDJPY H1 16689 10 -6.371 -6.371 1
start workflow USDJPY H1 16689 10 -6.371 -6.371 2
start workflow EURUSD H1 16689 10 -6.455 -6.455 1
start workflow EURUSD H1 16689 10 -6.455 -6.455 2
start workflow USDCHF H1 16689 10 -6.211 -6.211 1
start workflow USDCHF H1 16689 10 -6.211 -6.211 2
start workflow USDCAD H1 16689 10 -3.384 -3.384 1
start workflow USDCAD H1 16689 10 -3.384 -3.384 2
start workflow GBPUSD H1 16689 10 -2.925 -2.925 1
start workflow GBPUSD H1 16689 10 -2.925 -2.925 2
start workflow AUDUSD H1 16689 10 -2.481 -2.481 1
start workflow AUDUSD H1 16689 10 -2.481 -2.481 2

when running my workflow running it doesn't recognize the start command stating start: command not found.

The idea here is to run 2 windows per major currency pair.

I have my scripts working on windows and it does what I want it to do. 
So I think it's just a syntax error.

I already replaced all the ^ with / as well.