- Create OANDA practice account
- Create some v20 sub accounts (one pet intended bot)
- Find the dev portal on your own and key a API key
cp .example_env .env
- add your API key
cp bots_example.json bots.json
- design your bots. The account ids are listed on your OANDA account management page
go run main.go
[
{
"name": "Slow bot",
"account": "account_id_1",
"params": {
"candleGranularity": "M1",
"candleCount": "500",
"momentumPeriod": 300,
"rsiPeriod": 14,
"stDevPeriod": 14,
"volumeFactor": 100,
"SMAPeriod": 200,
"takeProfitFactor": 0.00015,
"stopLossFactor": 0.00200
}
},
]
- Iterate over pairs without current trade
- Get candles for frequency C
- Compute the momentum over period M
- Compute the RSI over period R
- Compute the SMA over period S
- Compute the stdDev value over period D
- Determine if this pair is due to return to trend-line
- Enter into trade with TP and SL, proportional to stdDev by factor P and L