Skip to content

Commit

Permalink
[TradingView] ignore price for market orders
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Aug 2, 2024
1 parent 01b711c commit f0f22ee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit f0f22ee

Please sign in to comment.