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
breakEvenActivated = input(true, title = 'Break Even Activated', type = input.bool, group="Weedy") | |
breakEvenPercentage = input(1, title = 'At how many % will the break even stop loss be activated', step=0.1, type = input.float, group="Weedy") * 0.01 | |
breakEvenProfitPercentage = input(0, title = 'Move Stop loss to x% profit', step=0.1, type = input.float, group="Weedy") * 0.01 | |
isLong = strategy.position_size > 0 | |
isShort = strategy.position_size < 0 | |
if (breakEvenActivated) | |
breakEvenLong = isLong and close > strategy.position_avg_price * (1 + breakEvenPercentage) | |
breakEvenPriceLong = strategy.position_avg_price * (1 + breakEvenProfitPercentage) |
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
// | |
// enter_short and enter_long are the conditions that you use to enter a trade. they need to be defined by you | |
// They look something like this: | |
// enter_long = window() and entryConfirmed | |
// strategy.entry(id='Long', long = true, when=enter_long) | |
// | |
bgcolor = close > strategy.position_avg_price[1] ? color.new(#168978, 80) : color.new(#f05350, 80) | |
border_color = close > strategy.position_avg_price[1] ? color.new(color.green, 20) : color.new(color.red, 20) | |
barsSinceLong = barssince(enter_long and strategy.position_size <= 0) |
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
#!/bin/bash | |
kubectl patch deployment $1 -p '{"spec": {"template": {"spec":{"containers":[{"name": "'$1'", "imagePullPolicy":"Always"}]}}}}' | |
sleep 15 | |
kubectl rollout restart deployment $1 | |
sleep 15 | |
kubectl patch deployment $1 -p '{"spec": {"template": {"spec":{"containers":[{"name": "'$1'", "imagePullPolicy":"IfNotPresent"}]}}}}' | |
# Getting Started | |
# 1. sudo nano /usr/local/bin/kroll | |
# 2. paste the code |
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
sudo apt-get update && | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common && | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ |
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
``` | |
docker network create webproxy && | |
git clone https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion proxy && | |
cd proxy && | |
cp .env.sample .env && | |
sed -i -e 's/\/path\/to\/your\/nginx\/data/\.\/data/g' .env && | |
docker-compose up -d | |
``` | |
An example of a docker-compose project looks like this: |
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 | |
set -e | |
UNUSED_USER_ID=21338 | |
UNUSED_GROUP_ID=21337 | |
echo "Fixing permissions." |
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
var log = new (require('captains-log'))(); | |
var Stardog = require('stardog'); | |
// Stardog is our database. | |
// To test this case you need a Stardog Server running. | |
var conn = new Stardog.Connection(); | |
conn.setEndpoint("localhost:5820"); | |
conn.setCredentials("admin", "admin"); |