Skip to content

Open-Trader/custom-strategy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom strategies by OpenTrader

Setup

  1. Install dependencies
npm install
  1. Set admin password
npx opentrader set-password <password>
  1. Start the OpenTrader
npm run start

Custom strategy

To create a custom strategy, add a new .mjs file in the /strategies dir. The file must export a generator function using default export.

For an example, check: rsiStrategy.mjs

UI

Once your strategy is ready, start OpenTrader: npm run start.

  1. Open the UI at http://localhost:8000
  2. Select Create new bot → Custom strategy
  3. In the selection field, pick your strategy, configure the options, then save and run.

Run with PM2

To run the bot on a VPS and keep it running in the background, you can use PM2.

npm install -g pm2

pm2 start npm --name "opentrader" -- start

pm2 status

Releases

No releases published