Custom strategy template for OpenTrader
- Install dependencies
npm install
- Set admin password
npx opentrader set-password <password>
- Start the OpenTrader
npm run start
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
Once your strategy is ready, start OpenTrader: npm run start
.
- Open the UI at http://localhost:8000
- Select
Create new bot → Custom strategy
- In the selection field, pick your strategy, configure the options, then save and run.