owocki / pytrader

cryptocurrency trading robot
MIT License
1.94k stars 429 forks source link

compute common technical indicators #76

Closed owocki closed 8 years ago

owocki commented 8 years ago

what

compute common technical indicators programatically

if you do not know what these are, might be worth checking out investopedia.com

why

i am experimenting with feeding these into the NN / classifiers

how

from history.technical_indicators import moving_average, relative_strength, moving_average_convergence, ichimoku
from history.models import Price
from django.utils import timezone
import datetime

created_on_min = timezone.now() - datetime.timedelta(days=30)
created_on_max = timezone.now() - datetime.timedelta(days=29)
price_objs = Price.objects.filter(symbol='BTC_ETH', created_on__gt=created_on_min, created_on__lt=created_on_max).order_by('id')
prices = [obj.price for obj in price_objs]

rsi = relative_strength(prices)
ma20 = moving_average(prices, 20, type='simple')
ma200 = moving_average(prices, 200, type='simple')

nslow = 26
nfast = 12
emaslow, emafast, macd = moving_average_convergence(prices, nslow=nslow, nfast=nfast)

_ichimoku = ichimoku(price_objs)

img

darkdarkdragon commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.05 ETH (34.61 USD @ $692.1/ETH) attached to it.