[DSLTradingMode] add and migrate TV trading mode for DSL#3277
Open
GuillaumeDSM wants to merge 2 commits intodevfrom
Open
[DSLTradingMode] add and migrate TV trading mode for DSL#3277GuillaumeDSM wants to merge 2 commits intodevfrom
GuillaumeDSM wants to merge 2 commits intodevfrom
Conversation
2e62b7d to
ad4f484
Compare
a8d6a5d to
9a979d5
Compare
Herklos
reviewed
Mar 4, 2026
| operands = [self._visit_node(operand) for operand in node.elts] | ||
| return operator_class(*operands) | ||
|
|
||
| if isinstance(node, ast.Dict): |
| step = self._visit_node(node.step) | ||
| return operator_class(lower, upper, step) | ||
|
|
||
| if isinstance(node, ast.Raise): |
Comment on lines
+26
to
+29
| @dataclasses.dataclass | ||
| class SymbolDependency(InterpreterDependency): | ||
| symbol: str | ||
| time_frame: typing.Optional[str] = None |
Member
There was a problem hiding this comment.
It seems a bit specific, is it the right place for this dataclass?
Member
Author
There was a problem hiding this comment.
right, i'll move it to trading
| return repr(value) | ||
|
|
||
|
|
||
| def resove_operator_params( |
| operator_class.get_parameters.return_value = [param_a] | ||
| operator_class.get_name.return_value = "test_op" | ||
| operator_class.get_parameters_description.return_value = "1: a [int] - first" | ||
| with pytest.raises(commons_errors.InvalidParametersError, match="test_op supports up to 1 parameters"): |
| input_quantity_ratio: decimal.Decimal | ||
|
|
||
|
|
||
| class _OrderFactory: |
Member
There was a problem hiding this comment.
There are 2 OrderFactory one for create_order operators and one for order operators?
| return True | ||
|
|
||
|
|
||
| class DSLTradingMode(trading_modes.AbstractTradingMode): |
Member
There was a problem hiding this comment.
Can this trading mode be selected by a user with the profile building UI? If so what happens if the user choose to use it?
Member
Author
| ) | ||
|
|
||
|
|
||
| class TestMapOtherParamsToDsl: |
Comment on lines
-292
to
+301
| chained_order = personal_data.create_order_instance( | ||
| trader=self.exchange_manager.trader, | ||
| order_type=order_type, | ||
| symbol=main_order.symbol, | ||
| current_price=price, | ||
| quantity=quantity or main_order.origin_quantity, | ||
| price=price, | ||
| side=side, | ||
| associated_entry_id=main_order.order_id, | ||
| reduce_only=reduce_only, | ||
| return await personal_data.create_and_register_chained_order_on_base_order( | ||
| main_order, | ||
| price, | ||
| order_type, | ||
| side, | ||
| quantity=quantity, | ||
| allow_bundling=allow_bundling, | ||
| tag=tag, | ||
| reduce_only=reduce_only, | ||
| update_with_triggering_order_fees=update_with_triggering_order_fees |
| return get_full_context(trading_mode, None, None, symbol, None, None, None, None, None, init_call=init_call) | ||
|
|
||
|
|
||
| def get_base_context_from_exchange_manager(exchange_manager, symbol): |
Member
Author
There was a problem hiding this comment.
yes, in create_order_operators where a trading mode might not be available
e4a726e to
78cf051
Compare
Member
Author
|
PR is up ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.