Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Added -runGenerations parameter #1504

Merged
merged 8 commits into from
Mar 15, 2018
Merged

Added -runGenerations parameter #1504

merged 8 commits into from
Mar 15, 2018

Conversation

theDiverDK
Copy link
Contributor

@theDiverDK theDiverDK commented Mar 14, 2018

In order to do some testing, i added a '-runGenerations' parameter.

If defined, it will run for that number of generations.

Also it will show like '=== Simulating generation 1 of 9 ===' if you specified 'runGenerations=10'

The reason it shows 'of 9' is due to it starts with generation=0

Did more code cleanup and fixed a bug due to i remove a needed line :(

@@ -38,7 +38,7 @@ The following parameters are available when executing darwin.js:
--use_strategies="all | strategy1,strategy2" # With this parameter, you can choose to test all, some (comma separated), or just one of the available strategies defined within darwin.
--population="150" # Optional - Number of simulation per generation
--population_data="./simulations/backtest_[simtimestamp]" # Optional - Resume backtesting on a previously terminated backtesting session.

--runGeneraions # Optional - Makes it possible to stop after a number of generations
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here: runGeneraions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting it.

Made a push with it fixed :)

@DeviaVir DeviaVir merged commit 262e45e into DeviaVir:unstable Mar 15, 2018
@LoneWolf345
Copy link
Contributor

Would you consider adding a push notification when darwin finishes?

@theDiverDK
Copy link
Contributor Author

Hi LoneWolf345

Actually I have not :)

But I would gladly implement it, if not to hard.

What type of push notification are you thinking about?

My idea with this command, was to say, run for 25 generations, then take the best and start trading, and then start over.

I am planning on adding a --runForMinutes

So you can say, Run for 5000 minutes, trade with best start over.

@LoneWolf345
Copy link
Contributor

I think you can trigger a notification and it will push to all configured notifiers. I was thinking something along the lines of "Darwin has finished running generations and found had the best result with an end balance of .

Or something like that. could also replace end balance with ROI.

@LoneWolf345
Copy link
Contributor

I also like the --runForMinutes flag as well. I think it would compliment if people have a different preference.

@theDiverDK
Copy link
Contributor Author

Ahh cool, had not looked into the notification part.

I'll look into it pretty soon. And i'll add the --runForMinutes as well :)

@LoneWolf345
Copy link
Contributor

maybe check out this from engine.js

  function pushMessage(title, message) {
    if (so.mode === 'live' || so.mode === 'paper') {
      notifier.pushMessage(title, message)
    }
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants