Skip to content

Commit

Permalink
lint line length
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-onthelawn committed Apr 22, 2024
1 parent b05e655 commit 0d81a88
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1802,11 +1802,16 @@ open class StateManagerAdaptor(
val reduceOnly = true
val postOnly = false

val timeInForce = null; // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field.
// TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field.
val timeInForce = null;

/**
* TP/SL market orders default to IOC execution.
* TP/SL limit orders default to GTD (default) execution.
*/
val execution = when (triggerOrder.type) {
OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" // All TP/SL market orders currently default to IOC execution.
OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" // All TP/SL limit orders currently default to GTD (default) execution.
OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC"
OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT"
else -> throw Exception("invalid triggerOrderType")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,11 +903,16 @@ internal class SubaccountSupervisor(
val reduceOnly = true
val postOnly = false

val timeInForce = null; // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field.
// TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field.
val timeInForce = null;

/**
* TP/SL market orders default to IOC execution.
* TP/SL limit orders default to GTD (default) execution.
*/
val execution = when (triggerOrder.type) {
OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" // All TP/SL market orders currently default to IOC execution.
OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" // All TP/SL limit orders currently default to GTD (default) execution.
OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC"
OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT"
else -> throw Exception("invalid triggerOrderType")
}

Expand Down

0 comments on commit 0d81a88

Please sign in to comment.