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 → Express Generator not Generating Strategies

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 15

Topic: Express Generator not Generating Strategies

Hi,

Please advise why this won't work from C:\express-generator\step_2_generate_strategies.cmd .

node ./bin/gen.js
--server                    Premium
--symbol                    EURUSD
--period                    M15
--max_data_bars             200000
--use_data_start            true
--entry_lots                0.1
--trade_direction_mode      LongAndShort
--opposite_entry_signal     IgnoreOrReverse
--stop_loss_usage           DoNotUse
--stop_loss_type            Fixed
--stop_loss_range_min       10
--stop_loss_range_max       100
--take_profit_usage         DoNotUse
--take_profit_range_min     10
--take_profit_range_max     100
--max_entry_slots           4
--max_exit_slots            2
--min_count_of_trades       200
--min_profit_factor         1.4
--min_r_squared             10
--max_working_minutes       6
--account_currency          USD
--initial_account           1000
--leverage                  100
--collections_capacity      200
--correlation_threshold     0.98
--resolve_correlation       true
--resolve_similar_rules     true
--trade_on_sunday           false
--use_data_start            true
--data_start                "20 Apr 2020 00:00 GMT"

pause

What happens when I double click it is it runs what's inside \bin\gen.settings.ini

I even tried this. gen.ini is under C:\express-generator\

node ./bin/gen.js --settings gen.ini

pause

The error is

Post's attachments

ErrorGeneratingStrategies.jpg
ErrorGeneratingStrategies.jpg 13.48 kb, file has never been downloaded. 

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

Re: Express Generator not Generating Strategies

You must put a caret character "^" to write multiline commands.

node ./bin/gen.js                   ^
--server                    Premium ^
--symbol                    EURUSD  ^
--period                    M15     ^
...
--use_data_start            true  ^
--data_start                "20 Apr 2020 00:00 GMT"

You do not put a caret character ( ^ ) at the last line of the command.

Re: Express Generator not Generating Strategies

Popov wrote:

You must put a caret character "^" to write multiline commands.

node ./bin/gen.js                   ^
--server                    Premium ^
--symbol                    EURUSD  ^
--period                    M15     ^
...
--use_data_start            true  ^
--data_start                "20 Apr 2020 00:00 GMT"

You do not put a caret character ( ^ ) at the last line of the command.

Thank You.

I tried again using Lisa's way. This one worked for me

TITLE Data Downloader

node  ./bin/fetch.js ^
 --fx-rates true ^
 --symbols EURUSD USDJPY GBPUSD BRENTCMDUSD AUDUSD USA500IDXUSD XAUUSD ^
 --periods M1 M5 M15 M30 H1 H4 D1 ^
 --max-bars 200000 ^
 --time-zone 0
 
pause

The issue from her video is with node .\bin\fetch.js ^

Now trying again for strategies using this

node ./bin/gen.js ^
--server                    Premium ^
--symbol                    EURUSD ^
--period                    M15 ^
--max_data_bars             200000 ^
--use_data_start            true ^
--entry_lots                0.1 ^
--trade_direction_mode      LongAndShort ^
--opposite_entry_signal     IgnoreOrReverse ^
--stop_loss_usage           DoNotUse ^
--stop_loss_type            Fixed ^
--stop_loss_range_min       10 ^
--stop_loss_range_max       100 ^
--take_profit_usage         DoNotUse ^
--take_profit_range_min     10 ^
--take_profit_range_max     100 ^
--max_entry_slots           4 ^
--max_exit_slots            2 ^
--min_count_of_trades       200 ^
--min_profit_factor         1.4 ^
--min_r_squared             10 ^
--max_working_minutes       6 ^
--account_currency          USD ^
--initial_account           1000 ^
--leverage                  100 ^
--collections_capacity      200 ^
--correlation_threshold     0.98 ^
--resolve_correlation       true ^
--resolve_similar_rules     true ^
--trade_on_sunday           false ^
--use_data_start            true ^
--data_start                "20 Apr 2020 00:00 GMT"
 
pause

I get this error from shell

Please advise

Post's attachments

ErrorGeneratingStrategies-2.jpg 67.36 kb, file has never been downloaded. 

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

Re: Express Generator not Generating Strategies

The message says that it cannot find "collections_capacity".

The correct option is "collection_capacity". Note the extra "s'.

Re: Express Generator not Generating Strategies

Popov wrote:

The message says that it cannot find "collections_capacity".

The correct option is "collection_capacity". Note the extra "s'.

Thank you. Now I get this error attached.

Post's attachments

ErrorGeneratingStrategies-3.jpg 74.87 kb, file has never been downloaded. 

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

6 (edited by aaronpriest 2023-08-20 14:53:17)

Re: Express Generator not Generating Strategies

You have "--use_data_start true ^" used twice in the same script. Remove one of them and it will probably work. ;-)

Re: Express Generator not Generating Strategies

aaronpriest wrote:

You have "--use_data_start true ^" used twice in the same script. Remove one of them and it will probably work. ;-)

Thank you. I definitely missed this one. Finally works as per attached image.

Will check if working with the file gen.ini gives any success, Also had it twice in gen.ini

That's what I prefer actually actually

node ./bin/gen.js ^
--settings gen.ini ^

pause
Post's attachments

SuccessGeneratingStrategies-1.jpg 58.28 kb, file has never been downloaded. 

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

Re: Express Generator not Generating Strategies

You don't need a caret at the last line of your multiline command.

Your last example can be written as:

node ./bin/gen.js ^
--settings gen.ini

pause

Or even better:

node ./bin/gen.js --settings gen.ini

pause

Re: Express Generator not Generating Strategies

Popov wrote:

You don't need a caret at the last line of your multiline command.

Your last example can be written as:

node ./bin/gen.js ^
--settings gen.ini

pause

Or even better:

node ./bin/gen.js --settings gen.ini

pause

Hi I tried this

node ./bin/gen.js --settings gen.ini

pause

Unfortunately I get this error from the image attached.

gen.ini is in directory C:\express-generator\

Post's attachments

ErrorReadingGen_ini-0.jpg 22.96 kb, file has never been downloaded. 

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

10 (edited by aaronpriest 2023-08-21 13:32:39)

Re: Express Generator not Generating Strategies

I suspect you are editing the original C:\express-generator\bin\gen.ini file. Don't do that. It will get overwritten every time Express Generator updates. Instead, make a copy of it and place it one folder up, above the bin folder, like C:\express-generator\generate.ini for example (call it anything you want). Then you can alter and reference that .ini file with "node ./bin/gen.js --settings gen.ini" (or generate.ini or settings.ini or whatever you want to call it).

Also, my start script is using \ instead of /, but I'm not sure if it matters. Mine looks like "node .\bin\gen.js --settings generate.ini". Try that if the other doesn't work.

Re: Express Generator not Generating Strategies

> Also, my start script is using \ instead of /, but I'm not sure if it matters.

Aaron, you are correct.

The "\" separator is native for Windows, and the "/" separator is native for Linux and MacOS.
However, "/" works for all of them.

Re: Express Generator not Generating Strategies

aaronpriest wrote:

I suspect you are editing the original C:\express-generator\bin\gen.ini file. Don't do that. It will get overwritten every time Express Generator updates. Instead, make a copy of it and place it one folder up, above the bin folder, like C:\express-generator\generate.ini for example (call it anything you want). Then you can alter and reference that .ini file with "node ./bin/gen.js --settings gen.ini" (or generate.ini or settings.ini or whatever you want to call it).

Also, my start script is using \ instead of /, but I'm not sure if it matters. Mine looks like "node .\bin\gen.js --settings generate.ini". Try that if the other doesn't work.

Hi that's not what I am doing. Under C:\express-generator, I created a file called gen.ini. The contents of the file is below

server                    = Premium                    ^
symbol                    = EURUSD                    ^
period                    = M15 ^
max_data_bars             = 200000                    ^
entry_lots                = 0.1                        ^
trade_direction_mode      = LongAndShort            ^
opposite_entry_signal     = IgnoreOrReverse            ^
stop_loss_usage           = DoNotUse                ^
stop_loss_type            = Fixed                    ^
stop_loss_range_min       = 10                        ^
stop_loss_range_max       = 100                        ^
take_profit_usage         = DoNotUse                ^
take_profit_range_min     = 10                        ^
take_profit_range_max     = 100                        ^
max_entry_slots           = 4                        ^
max_exit_slots            = 2                        ^
min_count_of_trades       = 200                        ^
min_profit_factor         = 1.4                        ^
min_r_squared             = 10                        ^
max_working_minutes       = 6                        ^
account_currency          = USD                        ^
initial_account           = 1000                    ^
leverage                  = 100                        ^
collection_capacity      = 200                        ^
correlation_threshold     = 0.98                    ^
resolve_correlation       = true                    ^
resolve_similar_rules     = true                    ^
trade_on_sunday           = false                    ^
use_data_start            = true                    ^
data_start                = "20 Apr 2020 00:00 GMT"

In same directory C:\express-generator, I created a script called step_2_generate_strategies_v2.cmd. The contents of the file is

node ./bin/gen.js --settings gen.ini

pause

When I double click it, it gives the error

Cannot read settings file: gen.ini per the image I attached previously

Perhaps I don't need to add the caret in an .ini file in comparison to adding a caret in the actual script except at the end of line ?

Any clues

13 (edited by aaronpriest 2023-08-21 15:38:01)

Re: Express Generator not Generating Strategies

The .ini file doesn't have a ^ at the end of every line, only if you include those settings in your command. When calling those settings from the .ini file there isn't a caret. You can override any setting in the .ini file by including it your command instead, and if you do that you need a ^ at the end of every line in your command, to tell the command to continue on to the next line. I have my generic settings in my .ini file, but sometimes I override a specific setting for a particular pair or timeframe by including a different setting in the command line.

Re: Express Generator not Generating Strategies

aaronpriest wrote:

The .ini file doesn't have a ^ at the end of every line, only if you include those settings in your command. When calling those settings from the .ini file there isn't a caret. You can override any setting in the .ini file by including it your command instead, and if you do that you need a ^ at the end of every line in your command, to tell the command to continue on to the next line. I have my generic settings in my .ini file, but sometimes I override a specific setting for a particular pair or timeframe by including a different setting in the command line.

Thank you. Will keep in mind. Right now to be honest Lisa's post helped to speed up using Express Generator. Just needed to tune a bit with advice given thus far. You are also right the '/' or '\' not an issue.

I've replicated Lisa's advanced script with pair am interested to look at using the Premier data for time being.

Am also trialing Tick Data Manager from one of Lisa's video to do further optimization testing on tick data.

Attached image is where am at.

Script is following Lisa's one from one of her blog post.

start step2a_a_template EURUSD H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]
start step2a_a_template USDJPY H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]
start step2a_a_template GBPUSD H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]
start step2a_a_template BRENTCMDUSD H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]
start step2a_a_template USA500IDXUSD H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]
start step2a_a_template XAUUSD H1 "22 August 2021 00:00 GMT" "22 August 2023 00:00 GMT" Coll_[SERVER]_[SYMBOL]_[PERIOD]_[YEAR]-[MONTH]-[DAY]

The template is from Lisa's blog post. The '\' works . So definitely was not an issue.

set symbol=%1
set period=%2
set startd=%3
set endd=%4
set ofile=%5

if "%symbol%" == "" EXIT
if "%period%" == "" EXIT

node .\bin\gen.js ^
 --server                 Premium ^
 --symbol                  %symbol% ^
 --period                 %period% ^
 --max-data-bars          200000 ^
 --use_data_start         true ^
 --use_data_end           true ^
 --entry_lots             0.1 ^
 --trade_direction_mode   LongAndShort ^
 --opposite_entry_signal  IgnoreOrReverse ^
 --stop_loss_usage        AlwaysUse ^
 --stop_loss_type         Fixed ^
 --stop_loss_range_min    10 ^
 --stop_loss_range_max    100 ^
 --take_profit_usage      AlwaysUse ^
 --take_profit_range_min  10 ^
 --take_profit_range_max  100 ^
 --max_entry_slots        4 ^
 --max_exit_slots         2 ^
 --min_count_of_trades    150 ^
 --min_profit_factor      1.2 ^
 --min_r_squared          10 ^
 --max-working-minutes    600 ^
 --enable_monte_carlo     true ^
 --ind_params_change_probability 20 ^
 --account_currency       USD ^
 --initial_account        1000 ^
 --leverage               400 ^
 --collection-capacity    200 ^
 --correlation_threshold  0.98 ^
 --resolve_correlation    true ^
 --resolve_similar_rules  true ^
 --trade_on_sunday        false ^
 --output                 %ofile% ^
 --data_start             %startd% ^
 --data_end               %endd%
 
 pause
Post's attachments

PC-Activity-Sample-0.jpg 349.49 kb, file has never been downloaded. 

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

Re: Express Generator not Generating Strategies

Lookin' good! I leave mine running all week on the 28 major/cross pairs, and then swap strategies in or out on weekends for the next week. I have a dedicated server with a Ryzen 5900X (12 cores, 24 threads), so it has enough horsepower to just churn out strategies every day. It's a single one-click command that opens all the instances. Very convenient!

Posts: 15

Pages 1

You must login or register to post a reply

Forex Software → Express Generator → Express Generator not Generating Strategies

Similar topics in this forum