This file contains hidden or 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
| #!/usr/bin/env bash | |
| # checks if branch has something pending | |
| function parse_git_dirty() { | |
| git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*" | |
| } | |
| # gets the current git branch | |
| function parse_git_branch() { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" |
This file contains hidden or 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
| decimal = min decimal # vd 1 2 3 4 thì lấy 1 | |
| sum_buy = 0 | |
| sum_sell = 0 | |
| 1. Xác định có long được ko? | |
| # tìm depth mà sum_buy > 1.5*sum_sell | |
| depth_i = -1 | |
| for depth = 0 to 100: | |
| sum_buy += usdt sum buy at depth, decimal |
This file contains hidden or 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
| decimal = min decimal # vd 1 2 3 4 thì lấy 1 | |
| sum_buy = 0 | |
| sum_sell = 0 | |
| # tìm depth mà sum_buy > 1.5*sum_sell | |
| depth_i = -1 | |
| for depth = 0 to 100: | |
| sum_buy += usdt sum buy at depth, decimal | |
| sum_sell += usdt sum sell at depth, decimal |