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
# initital update | |
sudo apt -y update | |
sudo apt-get -y upgrade | |
# create new user | |
adduser jesse | |
adduser jesse sudo | |
# close the terminal and login with jesse: | |
ssh-jesse |
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
https://coderwall.com/p/ds2dha/word-line-deletion-and-navigation-shortcuts-in-iterm2 | |
and | |
https://stackoverflow.com/a/48002681/11126038 |
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
# find the device name by listing all external volumes | |
diskutil list external | |
# format it | |
sudo diskutil eraseDisk FAT32 UPPERCASE-NAME FULL_DEVICE_ADDRESS | |
# example | |
diskutil eraseDisk FAT32 SULLY /dev/disk3 |
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
brew install unrar |
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
from jesse.strategies import Strategy | |
import jesse.indicators as ta | |
from jesse import utils | |
class SampleTrendFollowing(Strategy): | |
def should_long(self) -> bool: | |
return False | |
def should_short(self) -> bool: |
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
@property | |
def long_ema(self): | |
return ta.ema(self.candles, 50) | |
@property | |
def short_ema(self): | |
return ta.ema(self.candles, 21) |
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
@property | |
def atr(self): | |
return ta.atr(self.candles) |
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
def should_long(self) -> bool: | |
return self.short_ema > self.long_ema | |
def should_short(self) -> bool: | |
return self.short_ema < self.long_ema |
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
def go_long(self): | |
entry = self.price | |
stop = entry - 3*self.atr | |
qty = utils.risk_to_qty(self.capital, 3, entry, stop, fee_rate=self.fee_rate) | |
profit_target = entry + 5*self.atr | |
self.buy = qty, entry | |
self.stop_loss = qty, stop | |
self.take_profit = qty, profit_target |
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
# trading routes | |
routes = [ | |
('Bitfinex', 'BTCUSD', '6h', 'SampleTrendFollowing'), | |
] |