Skip to content

Commit

Permalink
feat(data-modeling): Implement data modeling for graph patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
ldamasio committed May 13, 2024
1 parent 7c527ec commit fc23368
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
34 changes: 29 additions & 5 deletions backends/monolith/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Symbol(models.Model):
class Meta(object):
unique_together = ["id", "client"]


class Order(models.Model):
client = models.ForeignKey(
Client, blank=True, null=True, on_delete=models.SET_NULL)
Expand Down Expand Up @@ -43,23 +42,48 @@ class Operation(models.Model):
stop_gain_percent = models.IntegerField(blank=True)
stop_loss_percent = models.IntegerField(blank=True)

class Note(models.Model):
user = models.ForeignKey(CustomUser, on_delete=models.DO_NOTHING)
body = models.TextField()
class TechnicalEvent():
type = ('Bullish', 'Bearish')

class Argument():
type = ('Bullish', 'Bearish')

class Accumulation():
type = ('Bullish', 'Bearish')

# Chart Patterns

class Rectangle():
type = ('Bullish', 'Bearish')

class Triangle():
type = ('Bullish', 'Bearish')

class Hammer():
type = ('Bullish', 'Bearish')

class InvertedHammer():
type = ('Bullish', 'Bearish')

class HangingMan():
type = ('Bullish', 'Bearish')

class Piercing():
type = ('Bullish', 'Bearish')

# Reversal Patterns

class Engulfing():
type = ('Bullish', 'Bearish')

class ShootingStart():
thre_candles = ('Closure', 'Opening', 'Closure')
type = ('Bullish')

class MorningStart():
thre_candles = ('Closure', 'Opening', 'Closure')
type = ('Bullish')


class EveningStart():
thre_candles = ('Closure', 'Opening', 'Closure')
type = ('Bullish')
5 changes: 5 additions & 0 deletions backends/monolith/backend/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('api.urls')),
]

if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
4 changes: 2 additions & 2 deletions backends/monolith/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ pytz==2022.4
pytz-deprecation-shim==0.1.0.post0
PyYAML==5.3.1
regex==2022.3.2
requests==2.22.0
requests
requests-unixsocket==0.2.0
SecretStorage==2.3.1
service-identity==18.1.0
simplejson==3.16.0
six==1.14.0
six
sqlparse==0.4.2
ssh-import-id==5.10
testresources==2.0.1
Expand Down

0 comments on commit fc23368

Please sign in to comment.