diff --git a/Trading/Mode/trading_view_signals_trading_mode/trading_view_signals_trading.py b/Trading/Mode/trading_view_signals_trading_mode/trading_view_signals_trading.py index ce1eebee8..a76a9979d 100644 --- a/Trading/Mode/trading_view_signals_trading_mode/trading_view_signals_trading.py +++ b/Trading/Mode/trading_view_signals_trading_mode/trading_view_signals_trading.py @@ -249,7 +249,8 @@ async def _parse_order_details(self, ctx, parsed_data): f"Unknown signal: {parsed_data[TradingViewSignalsTradingMode.SIGNAL_KEY]}, full data= {parsed_data}" ) state = trading_enums.EvaluatorStates.NEUTRAL - target_price = await self._parse_price(ctx, parsed_data, TradingViewSignalsTradingMode.PRICE_KEY, 0) + target_price = 0 if order_type == TradingViewSignalsTradingMode.MARKET_SIGNAL else ( + await self._parse_price(ctx, parsed_data, TradingViewSignalsTradingMode.PRICE_KEY, 0)) stop_price = await self._parse_price( ctx, parsed_data, TradingViewSignalsTradingMode.STOP_PRICE_KEY, math.nan )