Properly highlight deprecated settings

This commit is contained in:
Matthias 2022-04-09 10:18:14 +02:00
parent 47e314d922
commit ca361a26dc
3 changed files with 27 additions and 17 deletions

View File

@ -95,9 +95,12 @@ export interface StrategyBacktestResult {
use_custom_stoploss: boolean;
minimal_roi: Record<string, number>;
use_sell_signal?: boolean; // Deprecated
sell_profit_only?: boolean; // Deprecated
sell_profit_offset?: number; // Deprecated
/** @deprecated - replaced by use_exit_signal 2.x */
use_sell_signal?: boolean;
/** @deprecated - replaced by exit_profit_only 2.x */
sell_profit_only?: boolean;
/** @deprecated - replaced by exit_profit_offset 2.x */
sell_profit_offset?: number;
use_exit_signal?: boolean;
exit_profit_only?: boolean;
exit_profit_offset?: number;

View File

@ -1,8 +1,4 @@
export enum TradingMode {
SPOT = 'spot',
MARGIN = 'margin',
FUTURES = 'futures',
}
import { TradingMode } from './types';
export interface Order {
pair: string;
@ -71,7 +67,8 @@ export interface Trade {
/** Current absolute profit */
profit_abs: number;
sell_reason?: string; // Deprecated, replaced by exit reason
/** @deprecated - replaced by exit reason 2.x */
sell_reason?: string;
exit_reason?: string;
exit_order_status?: string;
min_rate?: number;

View File

@ -67,27 +67,36 @@ export enum RunModes {
OTHER = 'other',
}
export enum TradingMode {
SPOT = 'spot',
MARGIN = 'margin',
FUTURES = 'futures',
}
export interface UnfilledTimeout {
buy?: number; // Deprecated
/** @deprecated replaced by entry in 2.x */
buy?: number;
entry?: number;
sell?: number; // Deprecated
/** @deprecated replaced by exit in 2.x */
sell?: number;
exit?: number;
unit: string;
exit_timeout_count: number;
}
export interface OrderTypes {
/** @deprecated Replaced by entry in 2.x */
buy?: string;
/** @deprecated Replaced by exit in 2.x */
sell?: string;
forcesell?: string;
forcebuy?: string;
emergencysell?: string;
// TODO: this will need updating for futures, removal of the above, and mandatory of certain values.
entry?: string;
exit?: string;
emergencyexit?: string;
forcesexit?: string;
forceentry?: string;
emergency_exit?: string;
force_exit?: string;
force_entry?: string;
stoploss: string;
stoploss_on_exchange: boolean;
stoploss_on_exchange_interval: number;
@ -113,7 +122,7 @@ export interface BotState {
api_version?: number;
dry_run: boolean;
/** Futures, margin or spot */
trading_mode?: 'futures' | 'margin' | 'spot';
trading_mode?: TradingMode;
short_allowed?: boolean;
state: BotStates;
runmode: RunModes;
@ -124,7 +133,8 @@ export interface BotState {
unfilledtimeout: UnfilledTimeout;
order_types: OrderTypes;
exchange: string;
forcebuy_enabled?: boolean; // Deprecated
/** @deprecated replaced by force_entry_enable in 2.x */
forcebuy_enabled?: boolean;
force_entry_enable?: boolean;
max_open_trades: number;
minimal_roi: object;