Add order settings to strategy
This commit is contained in:
parent
660aca44db
commit
69cf8dcc10
|
@ -146,6 +146,7 @@ class StrategyForm(RestrictedFormMixin, ModelForm):
|
||||||
"asset_group": "Asset groups determine which pairs can be traded.",
|
"asset_group": "Asset groups determine which pairs can be traded.",
|
||||||
"risk_model": "The risk model to use for this strategy. Highly recommended.",
|
"risk_model": "The risk model to use for this strategy. Highly recommended.",
|
||||||
"trading_times": "When the strategy will place new trades.",
|
"trading_times": "When the strategy will place new trades.",
|
||||||
|
"order_settings": "Order settings to use for this strategy.",
|
||||||
# "order_type": "Market: Buy/Sell at the current market price. Limit: Buy/Sell at a specified price. Limits protect you more against market slippage.",
|
# "order_type": "Market: Buy/Sell at the current market price. Limit: Buy/Sell at a specified price. Limits protect you more against market slippage.",
|
||||||
# "time_in_force": "The time in force controls how the order is executed.",
|
# "time_in_force": "The time in force controls how the order is executed.",
|
||||||
"entry_signals": "Callbacks received to these signals will trigger a trade.",
|
"entry_signals": "Callbacks received to these signals will trigger a trade.",
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Generated by Django 4.1.6 on 2023-02-15 18:34
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0067_ordersettings_strategy_order_settings'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='strategy',
|
||||||
|
name='order_settings',
|
||||||
|
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='core.ordersettings'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
|
@ -398,7 +398,8 @@ class Strategy(models.Model):
|
||||||
"core.RiskModel", on_delete=models.PROTECT, null=True, blank=True
|
"core.RiskModel", on_delete=models.PROTECT, null=True, blank=True
|
||||||
)
|
)
|
||||||
order_settings = models.ForeignKey(
|
order_settings = models.ForeignKey(
|
||||||
"core.OrderSettings", on_delete=models.PROTECT, null=True, blank=True
|
"core.OrderSettings",
|
||||||
|
on_delete=models.PROTECT,
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
Loading…
Reference in New Issue