summaryrefslogtreecommitdiff
path: root/app/trading/migrations
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-01-03 17:02:50 -0500
committerlxf <sng@luxagraf.net>2022-01-03 17:02:50 -0500
commit617b485a0147266d93ec7db22afd2cd9055b0c09 (patch)
tree93462a0cf8c93c211c3db7223df48f94f94f3b96 /app/trading/migrations
parent1123d655bd6708fba056d9800af61e9f2e8bd6eb (diff)
trad: new options tracker that works better for WON system
Diffstat (limited to 'app/trading/migrations')
-rw-r--r--app/trading/migrations/0017_luxoptioncontact_luxoptionpurchase.py34
-rw-r--r--app/trading/migrations/0018_luxoptionpurchase_pl.py18
-rw-r--r--app/trading/migrations/0019_auto_20220103_1458.py32
-rw-r--r--app/trading/migrations/0020_auto_20220103_1517.py23
4 files changed, 107 insertions, 0 deletions
diff --git a/app/trading/migrations/0017_luxoptioncontact_luxoptionpurchase.py b/app/trading/migrations/0017_luxoptioncontact_luxoptionpurchase.py
new file mode 100644
index 0000000..2258466
--- /dev/null
+++ b/app/trading/migrations/0017_luxoptioncontact_luxoptionpurchase.py
@@ -0,0 +1,34 @@
+# Generated by Django 3.2.7 on 2022-01-03 13:11
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0016_alter_luxoptionstrade_pl'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='LuxOptionContact',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('symbol', models.CharField(max_length=256)),
+ ('strike_price', models.FloatField()),
+ ('expiration_date', models.DateField()),
+ ('contract_open_price', models.FloatField()),
+ ('contract_close_price', models.FloatField(blank=True, null=True)),
+ ('call_put', models.IntegerField(choices=[(0, 'Call'), (1, 'Put')], default=0)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='LuxOptionPurchase',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('symbol', models.CharField(max_length=256)),
+ ('open_date', models.DateTimeField(auto_now_add=True)),
+ ('contracts', models.ManyToManyField(to='trading.LuxOptionContact')),
+ ],
+ ),
+ ]
diff --git a/app/trading/migrations/0018_luxoptionpurchase_pl.py b/app/trading/migrations/0018_luxoptionpurchase_pl.py
new file mode 100644
index 0000000..46d3b66
--- /dev/null
+++ b/app/trading/migrations/0018_luxoptionpurchase_pl.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.7 on 2022-01-03 14:00
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0017_luxoptioncontact_luxoptionpurchase'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxoptionpurchase',
+ name='pl',
+ field=models.FloatField(blank=True, null=True),
+ ),
+ ]
diff --git a/app/trading/migrations/0019_auto_20220103_1458.py b/app/trading/migrations/0019_auto_20220103_1458.py
new file mode 100644
index 0000000..d0d6529
--- /dev/null
+++ b/app/trading/migrations/0019_auto_20220103_1458.py
@@ -0,0 +1,32 @@
+# Generated by Django 3.2.7 on 2022-01-03 14:58
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0018_luxoptionpurchase_pl'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='luxoptionpurchase',
+ options={'get_latest_by': 'open_date', 'ordering': ('-open_date',)},
+ ),
+ migrations.RemoveField(
+ model_name='luxoptionpurchase',
+ name='contracts',
+ ),
+ migrations.AddField(
+ model_name='luxoptioncontact',
+ name='options_purchase',
+ field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='trading.luxoptionpurchase'),
+ ),
+ migrations.AlterField(
+ model_name='luxoptioncontact',
+ name='call_put',
+ field=models.IntegerField(choices=[(0, 'C'), (1, 'P')], default=0),
+ ),
+ ]
diff --git a/app/trading/migrations/0020_auto_20220103_1517.py b/app/trading/migrations/0020_auto_20220103_1517.py
new file mode 100644
index 0000000..73c4b5f
--- /dev/null
+++ b/app/trading/migrations/0020_auto_20220103_1517.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.2.7 on 2022-01-03 15:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0019_auto_20220103_1458'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxoptionpurchase',
+ name='close_date',
+ field=models.DateTimeField(null=True),
+ ),
+ migrations.AddField(
+ model_name='luxoptionpurchase',
+ name='status',
+ field=models.IntegerField(choices=[(0, 'Open'), (1, 'Closed')], default=1),
+ ),
+ ]