forked from shaggy63/rh-trading-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-sample.py
executable file
·39 lines (37 loc) · 1.98 KB
/
config-sample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
config = {
'username': "", # Robinhood credentials. If you don't want to keep them stored here, launch "./2fa.py" to setup the access token interactively
'password': "",
'trades_enabled': False, # if False, just collect data
'simulate_api_calls': False, # if enabled, just pretend to connect to Robinhood
'data_source': 'robinhood', # which platform to use to track prices: kraken or robinhood
'ticker_list': { # list of coin ticker pairs Kraken/Robinhood (XETHZUSD/ETH, etc) - https://api.kraken.com/0/public/AssetPairs
'XETHZUSD': 'ETH'
},
'trade_signals': { # select which strategies to use (buy, sell); see classes/signals.py for more info
'buy': 'sma_rsi_threshold',
'sell': 'above_buy'
},
'moving_average_periods': { # data points needed to calculate SMA fast, SMA slow, MACD fast, MACD slow, MACD signal
'sma_fast': 12, # 12 data points per hour
'sma_slow': 48,
'ema_fast': 12,
'ema_slow': 48,
'macd_fast': 12,
'macd_slow': 26,
'macd_signal': 7
},
'rsi_period': 48, # data points for RSI
'rsi_threshold': { # RSI thresholds to trigger a buy or a sell order
'buy': 39.5,
'sell': 60
},
'buy_below_moving_average': 0.0075, # buy if price drops below Fast_MA by this percentage (0.75%)
'profit_percentage': 0.01, # sell if price raises above purchase price by this percentage (1%)
'buy_amount_per_trade': 0, # if greater than zero, buy this amount of coin, otherwise use all the cash in the account
'reserve': 0.0, # tell the bot if you don't want it to use all of the available cash in your account
'stop_loss_threshold': 0.3, # sell if the price drops at least 30% below the purchase price
'minutes_between_updates': 5, # 1 (default), 5, 15, 30, 60, 240, 1440, 10080, 21600
'cancel_pending_after_minutes': 20, # how long to wait before cancelling an order that hasn't been filled
'save_charts': True,
'max_data_rows': 2000
}