Skip to content

Commit 8dc9bf4

Browse files
author
evzpav
committed
Add activation price option to README
1 parent da7742d commit 8dc9bf4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,13 @@ func (s *BasicStrategy) OnTick() error {
8585
s.Exchange.OpenLong(symbol, OrderTypeLimit, 5000, 10)
8686
s.Exchange.CloseLong(symbol, OrderTypeLimit, 6000, 10)
8787

88-
//Trailing Stop Market Order - sell stop loss order for long position
88+
//Trailing Stop Market Order - Binance - sell stop loss order for long position
8989
callbackRate := 5.0 // from 0.1% until 5% allowed
9090
s.Exchange.PlaceOrder(symbol, Sell, OrderTypeTrailingStopMarket, 0.0, 10,
91-
OrderCallbackRateOption(callbackRate), OrderReduceOnlyOption(true))
91+
OrderCallbackRateOption(callbackRate),
92+
OrderActivationPriceOption(5000.0), // optional - default as the latest price
93+
OrderReduceOnlyOption(true),
94+
)
9295

9396
s.Exchange.PlaceOrder(symbol,
9497
Buy, OrderTypeLimit, 1000.0, 10, OrderPostOnlyOption(true))

README_en.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,13 @@ func (s *BasicStrategy) OnTick() error {
8585
s.Exchange.OpenLong(symbol, OrderTypeLimit, 5000, 10)
8686
s.Exchange.CloseLong(symbol, OrderTypeLimit, 6000, 10)
8787

88-
//Trailing Stop Market Order - sell stop loss order for long position
88+
//Trailing Stop Market Order - Binance - sell stop loss order for long position
8989
callbackRate := 5.0 // from 0.1% until 5% allowed
9090
s.Exchange.PlaceOrder(symbol, Sell, OrderTypeTrailingStopMarket, 0.0, 10,
91-
OrderCallbackRateOption(callbackRate), OrderReduceOnlyOption(true))
91+
OrderCallbackRateOption(callbackRate),
92+
OrderActivationPriceOption(5000.0), // optional - default as the latest price
93+
OrderReduceOnlyOption(true),
94+
)
9295

9396
s.Exchange.PlaceOrder(symbol,
9497
Buy, OrderTypeLimit, 1000.0, 10, OrderPostOnlyOption(true))

0 commit comments

Comments
 (0)