rest 版OKEX跨期对冲策略(教学)
8
Follow
1363
Followers
Source
JavaScript
function Hedge (isOpen, priceA, priceB) {
exchanges[0].SetDirection(isOpen ? "sell" : "closesell")
exchanges[1].SetDirection(isOpen ? "buy" : "closebuy");
(function (routineA, routineB) {
Log(routineA.wait(), routineB.wait(), priceA, priceB)
})(exchanges[0].Go(isOpen ? "Sell" : "Buy", priceA, _ContractNum), exchanges[1].Go(isOpen ? "Buy" : "Sell", priceB, _ContractNum));
}
var slidePrice = 5
function main () {
var tickerA, tickerB
var arr = []Strategy parameters
Related strategies
Comment
All comments (7)
- 1



