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 / 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 / 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 / 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 / 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.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 / etc-nginx-sites-available-default
Last active December 12, 2017 10:19
basic server setup
server {
listen 80;
listen [::]:80;
server_name test.swarmdev.city;
location / {
proxy_pass http://127.0.0.1:8088;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@bkawk
bkawk / config.ini
Last active December 4, 2017 21:12
EOS Config File
get-transactions-time-limit = 3
block-log-dir = "blocks"
block-interval-seconds = 1
rcvd-block-trans-execution-time = 72
trans-execution-time = 18
create-block-trans-execution-time = 18
per-authorized-account-transaction-msg-rate-limit = 1800
per-code-account-transaction-msg-rate-limit-time-frame-sec = 18
per-code-account-transaction-msg-rate-limit = 18000
per-code-account-max-storage-db-limit-mbytes = 5
@bkawk
bkawk / .bashrc
Created December 4, 2017 01:09
EOS Install
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
@bkawk
bkawk / reduce.js
Last active October 15, 2017 09:17
Reduce with promise
function _test(actions){
return actions.reduce((chain, action) => {
return chain.then(() => action.functionToCall(action.argumentToSend)).then(val => console.log(val));
}, Promise.resolve());
}
function _one(data){
return new Promise((resolve, reject) => {
setTimeout(function(){
console.log(data);
@bkawk
bkawk / int.sol
Last active July 21, 2017 00:01
Contract Lessons
pragma solidity ^0.4.0;
contract myAge {
uint age = 41;
function getAge() constant returns(uint){
return age;
}
}