@@ -18,10 +18,10 @@ public struct SwiftTraderStopLimitOrderInput {
18
18
public let entryPrice : Double
19
19
public let exchange : SwiftTraderExchange
20
20
public let isLong : Bool
21
- public let ticker : String
22
- public let tickerSize : String
23
21
public let offset : Double
24
22
public let profitPercentage : Double
23
+ public let ticker : String
24
+ public let tickerSize : String
25
25
26
26
// MARK: - Lifecycle
27
27
@@ -35,35 +35,34 @@ public struct SwiftTraderStopLimitOrderInput {
35
35
/// - currentPrice: The current price of the asset.
36
36
/// - entryPrice: E.g.: "42.856", "43567.98", "127.01".
37
37
/// - exchange: E.g.: Kucoin, Binance
38
- /// - isLong: Indicates the side of the position. `true` indicates "long". `false` indicates "short. The side is taken into consideration
38
+ /// - isLong: Indicates the side of the position. `true` indicates "long". `false` indicates "short" . The side is taken into consideration
39
39
/// when performing trailing stop logic.
40
- /// - ticker: E.g.: BTCUSDT
41
- /// - tickerSize: E.g.: "1", "0.05", "0.00001"
42
40
/// - offset: How far the **"target price"** of the stop order will be from the `currentPrice`. For example,
43
41
/// suppose the `profitPercentage` is `1.0%` and the `offset` is `0.75%`. The stop order to be placed will be `0.25%`
44
42
/// of the current price (`1.0%` - `0.75%`). Using the same `offset`, if the `profitPercentage` is now `2.0%`, the stop order
45
43
/// will be placed at `1.25%` of the current price (`2.0%` - `0.75%`).
46
44
/// - profitPercentage: The percentage of the profit at this point, e.g.: "1.5", "0.67".
45
+ /// - ticker: E.g.: BTCUSDT
46
+ /// - tickerSize: E.g.: "1", "0.05", "0.00001"
47
47
public init ( clean: Bool ,
48
48
contractSymbol: String ,
49
49
currentPrice: Double ,
50
50
entryPrice: Double ,
51
51
exchange: SwiftTraderExchange ,
52
52
isLong: Bool ,
53
- ticker: String ,
54
- tickerSize: String ,
55
53
offset: Double ,
56
- profitPercentage: Double
57
- ) {
54
+ profitPercentage: Double ,
55
+ ticker: String ,
56
+ tickerSize: String ) {
58
57
self . clean = clean
59
58
self . contractSymbol = contractSymbol
60
59
self . currentPrice = currentPrice
61
60
self . entryPrice = entryPrice
62
61
self . exchange = exchange
63
62
self . isLong = isLong
64
- self . ticker = ticker
65
- self . tickerSize = tickerSize
66
63
self . offset = offset
67
64
self . profitPercentage = profitPercentage
65
+ self . ticker = ticker
66
+ self . tickerSize = tickerSize
68
67
}
69
68
}
0 commit comments