Skip to content

Instantly share code, notes, and snippets.

View bkawk's full-sized avatar

Will Hill bkawk

  • Digital Dreams
  • Earth
View GitHub Profile
@bkawk
bkawk / ghost.pine
Created February 25, 2018 04:20
GHOST indicator
study(title="GHOST Indicator [@Bkawk]", shorttitle="GHOST Indicator [@bkawk]", overlay=true)
slime = #B7ED0A
blood = #FF4167
inputBigTrend1 = input(850, minval=1, title="EMA1")
inputBigTrend2 = input(200, minval=1, title="EMA2")
inputEma = input(50, minval=1, title="EMA3")
inputConversion = input(9, minval=1, title="Conversion")
inputBase = input(26, minval=1, title="Base")
@bkawk
bkawk / ghostLocked.pine
Created March 3, 2018 03:14
Locked Ghost Indicator
// =====================================
// GHOST Indicator v0.0.1
// @author @bkawk
// =====================================
study(title="GHOST Indicator [@Bkawk]", shorttitle="GHOST Indicator [@bkawk]", overlay=true)
slime = #B7ED0A
@bkawk
bkawk / ghost-rsi.pine
Last active March 4, 2018 01:10
GHOST RSI
study(title="GHOST RSI [@bkawk]", shorttitle="GHOST RSI [@bkawk]")
src = close, len = input(14, minval=1, title="Length")
up = ema(max(change(src), 0), len)
down = ema(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
slime = #B7ED0A
blood = #FF4167
overbought = input(80, minval=1, title="Overbought")
bullish = input(60, minval=1, title="Bullish")
@bkawk
bkawk / ghostGlance.pine
Created April 6, 2018 09:25
GHOST GLANCE
//@version=2
study("GHOST GLANCE [@bkawk]", overlay = false)
slime = #B7ED0A
blood = #FF4167
rsi = rsi(close, 14)
color = if ((ema(close, 12) - ema(close, 26)) - (ema(ema(close, 12) - ema(close, 26), 9))) > 0
rsi > 50? slime : blood
else
rsi < 50 ? blood : slime
plot(100, style = area, color = color)
@bkawk
bkawk / GhostBinary.pine
Created April 6, 2018 15:14
GhostBinary
//@version=2
study("GHOST Binary [@bkawk]", overlay = false)
slime = #B7ED0A
blood = #FF4167
fastMA = input(title="Fast Period", type = integer, defval = 12)
slowMA = input(title="Slow Period", type = integer, defval = 26)
signalSmooth = input(title="Smoothing Amount", type = integer, defval = 9)
tf = period
fst = security(tickerid, tf, ema(close, fastMA))
slw = security(tickerid, tf, ema(close, slowMA))
@bkawk
bkawk / api server setup
Last active August 30, 2018 10:24
api server setup
CONNECT & UPDATE
=========================
ssh [email protected]
sudo apt-get update
UPDATE NODE
=========================
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
@bkawk
bkawk / .travis.yml
Created December 24, 2018 04:29
deploy pwa to S3 via Travis
language: node_js
node_js:
- '10'
dist: trusty
sudo: required
addons:
firefox: latest
chrome: stable
cache:
directories:
@bkawk
bkawk / .travis.yml
Created December 24, 2018 04:49
Deploy branches to different buckets
language: node_js
node_js:
- '10'
dist: trusty
sudo: required
addons:
firefox: latest
chrome: stable
cache:
directories:
@bkawk
bkawk / index.html
Created January 26, 2019 13:38
CSS Only Language Drop Down
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin - https://jsbin.com/qapatubitu/13/edit?html,css,output</title>
</head>
<body>
public class numberToString {
public static void main(String[] args) {
int input = 20 ;
String undred = "undred";
String[] endNumbers = {"", "one", "two", "three","four", "five", "six", "seven", "eight", "nine", "ten"};
String[] weirdTeens = {"", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
String[] overTwenty = {"", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
if (input <= 10) System.out.println(input + " " + endNumbers[input]);
if (input > 10 && input < 20) System.out.println(input + " " + weirdTeens[input - 10]);
if (input > 15) {