Last active
April 23, 2018 18:08
-
-
Save ekam230/8685c872dfab81c0511bcbb885e6c812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($getOrder["ordStatus"] == "New"){ | |
$i=0; | |
$opos=False; | |
while (($bitmex2->cancelAllOpenOrders() !=TRUE) or $opos==True){ | |
message("Try Cancel Order"); | |
$bitmex2->cancelAllOpenOrders(); | |
usleep(505); | |
$log->warning("Try Cancel Order $name"); | |
$i++; | |
if ($i==3){ | |
$openpos=$bitmex2->getOpenPositions(); | |
var_dump($openpos); | |
if ($openpos == TRUE) $opos=True; | |
else $i=0; | |
} | |
var_dump($opos); | |
var_dump($openpos); | |
} | |
message("Cancel Order Comleted"); | |
$orderNow = array(); | |
usleep(510); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Свеча зеленая | |
if($rootCandle['close'] > $rootCandle['open']) { | |
$bar = "green"; | |
message("Close: {$rootCandle['close']} > Open: {$rootCandle['open']}"); | |
message("Bar: $bar"); | |
} | |
// Свеча красная | |
elseif($rootCandle['close'] < $rootCandle['open']) { | |
$bar = "red"; | |
message("Close: {$rootCandle['close']} < Open: {$rootCandle['open']}"); | |
message("Bar: $bar"); | |
} | |
// Ничего не произошло | |
else { | |
$bar = "still"; | |
message("Close: {$rootCandle['close']} = Open: {$rootCandle['open']}"); | |
message("Bar: $bar"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment