Move type field to signal
This commit is contained in:
@@ -72,12 +72,10 @@ class HookForm(RestrictedFormMixin, ModelForm):
|
||||
fields = (
|
||||
"name",
|
||||
"hook",
|
||||
"type",
|
||||
)
|
||||
help_texts = {
|
||||
"name": "Name of the hook. Informational only.",
|
||||
"hook": "The URL slug to use for the hook. Make it unique.",
|
||||
"type": "Whether the hook is used for entering or exiting trades, or determining the trend.",
|
||||
}
|
||||
|
||||
|
||||
@@ -88,12 +86,14 @@ class SignalForm(RestrictedFormMixin, ModelForm):
|
||||
"name",
|
||||
"signal",
|
||||
"hook",
|
||||
"type",
|
||||
"direction",
|
||||
)
|
||||
help_texts = {
|
||||
"name": "Name of the signal. Informational only.",
|
||||
"signal": "The name of the signal in Drakdoo. Copy it from there.",
|
||||
"hook": "The hook this signal belongs to.",
|
||||
"type": "Whether the signal is used for entering or exiting trades, or determining the trend.",
|
||||
"direction": "The direction of the signal. This is used to determine if the signal is a buy or sell.",
|
||||
}
|
||||
|
||||
@@ -119,9 +119,9 @@ class AccountForm(RestrictedFormMixin, ModelForm):
|
||||
|
||||
class StrategyForm(RestrictedFormMixin, ModelForm):
|
||||
fieldargs = {
|
||||
"entry_signals": {"hook__type": "entry"},
|
||||
"exit_signals": {"hook__type": "exit"},
|
||||
"trend_signals": {"hook__type": "trend"},
|
||||
"entry_signals": {"type": "entry"},
|
||||
"exit_signals": {"type": "exit"},
|
||||
"trend_signals": {"type": "trend"},
|
||||
}
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user