34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
|
# Generated by Django 4.1.4 on 2022-12-21 21:43
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('core', '0047_notificationsettings'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='RiskModel',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=255)),
|
||
|
('description', models.TextField(blank=True, null=True)),
|
||
|
('max_loss_percent', models.FloatField(default=0.05)),
|
||
|
('max_risk_percent', models.FloatField(default=0.05)),
|
||
|
('max_open_trades', models.IntegerField(default=10)),
|
||
|
('max_open_trades_per_symbol', models.IntegerField(default=2)),
|
||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='account',
|
||
|
name='riskmodel',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.riskmodel'),
|
||
|
),
|
||
|
]
|