ChartOrder class
Represents a trading order displayed on the chart canvas with support for attached Take Profit (TP) and Stop Loss (SL) brackets.
Constructors
-
ChartOrder({required String id, required String symbol, required OrderSide side, OrderType type = OrderType.limit, required double price, double quantity = 1.0, double? takeProfitPrice, double? stopLossPrice, String? customLabel, OrderStatus status = OrderStatus.active, Map<
String, dynamic> ? metadata}) -
const
-
ChartOrder.fromJson(Map<
String, dynamic> json) -
factory
Properties
- customLabel → String?
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasStopLoss → bool
-
no setter
- hasTakeProfit → bool
-
no setter
- id → String
-
final
- isBuy → bool
-
no setter
- isSell → bool
-
no setter
-
metadata
→ Map<
String, dynamic> ? -
final
- price → double
-
final
- quantity → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- side → OrderSide
-
final
- status → OrderStatus
-
final
- stopLossPercentage → double?
-
Returns the distance percentage of the Stop Loss relative to the order price.
no setter
- stopLossPrice → double?
-
final
- symbol → String
-
final
- takeProfitPercentage → double?
-
Returns the distance percentage of the Take Profit relative to the order price.
no setter
- takeProfitPrice → double?
-
final
- type → OrderType
-
final
Methods
-
copyWith(
{String? id, String? symbol, OrderSide? side, OrderType? type, double? price, double? quantity, double? takeProfitPrice()?, double? stopLossPrice()?, String? customLabel, OrderStatus? status, Map< String, dynamic> ? metadata}) → ChartOrder -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override