online trading based on indicators and candles
Project description
base trading bot. mathematics of mechanical trading systems
#This simple library allows to count and to plot several indicators.
#Supported indicators: #'ivar', 'atr', 'macd', 'rsi', 'bollinger', 'aroon', 'stohasctic'
#Supported candles: #'black_maribozu', 'white_maribozu', 'solders', 'crows'
#example of usage:
importing
from candleplot_trade_library import candleplotfigures
creating instance
CPF = candleplotfigures(ticker = 'BTC-USD', # 'BTC-USD', 'GOOG' period = "1d", # start= '2021-05-25 14:38:00-04:00', interval = "1m", html_log = True, full_console_log = True, buy_commission = 0.003, sell_commission = 0.003)
getting indicators plot
CPF.indicators.atr(TR = [14, 100]) CPF.indicators.macd(EMA1 = 12, EMA2 = 26, EMA_signal = 9) CPF.indicators.rsi(N = 14, N1 = 20) CPF.indicators.bollinger(window = 10, k = 2) CPF.indicators.ivar(m = 10) CPF.indicators.aroon(window = 14) CPF.indicators.stohasctic(window = 12, m = 3) CPF.plot(['all'])
getting candle plot
CPF.candles.black_maribozu(percent_up = 0.1, percent_down = 0.1) CPF.candles.white_maribozu(percent_up = 0.1, percent_down = 0.1) CPF.candles.three_white_solders(percent = 0.5) CPF.candles.three_black_crows(percent = 0.5) CPF.plot(['white_maribozu', 'black_maribozu', 'three_white_solders', 'three_black_crows'])
getting plot for everything in library
CPF.plot(['all'])
defining indicators
indicators = [ 'ivar', 'atr', 'macd', 'rsi', 'bollinger', 'aroon', 'stohasctic', 'stohasctic_sma', 'black_maribozu', 'white_maribozu', 'solders', 'crows' ]
defining strategy (though its only one by now)
CPF.set_traid_strategy('simple', indicators = indicators, money = 300000)
run test trade for previous periods
CPF.trade_several(start_idx = 220)
run trade in real time
CPF.start(refresh_time = 5)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for candleplot_trade-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706d62563328e786916103311794114603522263fcaf2e08f497b170529f9d71 |
|
MD5 | c2f71b5050559ab569ceb0b73a30ba61 |
|
BLAKE2b-256 | 26ac792f408befea2febe5b7c3981b1b93b72553de0985064e6c7274dbd9748a |