Skip to content

Instantly share code, notes, and snippets.

View ivank2139's full-sized avatar
🏠
Working from home

Ivan S Kirkpatrick ivank2139

🏠
Working from home
View GitHub Profile
@ivank2139
ivank2139 / gist:41465c739545bbe020a7b0d404ceb9c0
Created October 30, 2017 13:03
verification of my github account on blockstack
Verifying my Blockstack ID is secured with the address 19nnwdoAsk6h7qaxtGFwUjpZxAhZF11RSK
@ivank2139
ivank2139 / winners.xml
Created March 29, 2020 19:04
Florida Lottery List of winners
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Florida Lottery Winning Numbers</title>
<link>http://www.flalottery.com</link>
<description>Florida Lottery winning number drawing results for FLORIDA LOTTO, MEGA MILLIONS, POWERBALL, CASH4LIFE, JACKPOT TRIPLE PLAY, LUCKY MONEY, FANTASY 5, Midday and Evening PICK 2, PICK3, PICK 4 and PICK 5</description>
<item game="powerball" nextjp="$140 Million" nextdd="Saturday, March 21, 2020" winnum="15-27-44-59-63 PB8 X4" windd="Wednesday, March 18, 2020" myflv="widget_pb.flv" winnumNM="15-27-44-59-63 PB8" name="POWERBALL">
<title>POWERBALL Drawing Results</title>
<link>http://www.flalottery.com/powerball.do</link>
<description>POWERBALL winning numbers are 15-27-44-59-63 PB8 X4 for 03/18/2020 and the next estimated Jackpot is $140 Million for 03/21/2020</description>
@ivank2139
ivank2139 / taskWindow.go
Created March 29, 2020 19:16
Task Window
//myApp := app.New()
myWindow := a.NewWindow("Tasks")
myWindow.SetTitle("Guitrak Client")
updateTasks("1")
rt := []string{}
for _, task := range tasks {
rt = append(rt, task.Name)
}
radio := widget.NewRadio(rt, func(value string) {
log.Info.Println("Radio set to", value)
@ivank2139
ivank2139 / apiHandler.go
Last active March 29, 2020 19:42
API and Handler
r.HandleFunc("/guitrak/{user}", guitrak)
func guitrak(w http.ResponseWriter, r *http.Request) {
log.Info.Println("Guitrak update handler.")
vars := mux.Vars(r)
uid := vars["user"]
w.WriteHeader(http.StatusOK)
//templates.ExecuteTemplate(w, "user.gohtml", DataAcctrakII{Users: pgdb.FindAllUsers()})
tasks := pgdb.FindAllTasksByUserId(uid)
@ivank2139
ivank2139 / HistoryAnalysisETH.txt
Created April 4, 2020 20:50
Historical Analysis of Ethereum buy and sell recommendations from the Keiko trading advisor.
Initial Cash $1000, Initial Eth 0, Initial Portfolio value $1000
Buy recommendation 286.03 ETH at price 0.87, cost $250 on 2015-09-14
After trade, cash available $750, ETH available 286.03, portfolio total $1000
Buy recommendation 321.58 ETH at price 0.58, cost $187.5 on 2015-09-28
After trade, cash available $562.5, ETH available 607.61, portfolio total $916.77
Buy recommendation 319.77 ETH at price 0.44, cost $140.62 on 2015-10-21
After trade, cash available $421.88, ETH available 927.38, portfolio total $829.71
@ivank2139
ivank2139 / macd.go
Created April 5, 2020 03:42
An implementation of MACD in Go.
package indicator
import (
"strings"
"github.com/shopspring/decimal"
)
/*
This indicator consists of 3 main parts:
@ivank2139
ivank2139 / rsi.go
Created April 5, 2020 04:12
An implementation of RSI in Go.
/*
RSI = 100 - (100/1+RS)
relative Strength Indicator, 0 - 100 scale, 14 periods.
RS = Average Gain / Average Loss
rs > 70 is overbought and pullback is imminent
rs < 30 is oversold and good time to buy
divergence signals are of great interest, bullish vs bearish divergence.
@ivank2139
ivank2139 / ema.go
Created April 5, 2020 04:14
An implementation of Exponential Moving Average in Go.
package indicator
import "github.com/shopspring/decimal"
// Ema is Exponential Moving Average
type Ema struct {
Weight decimal.Decimal
Result decimal.Decimal
Age int
@ivank2139
ivank2139 / analyzer.go
Created April 5, 2020 04:21
The logic for determining if a buy or sell trade is recommended.
func Analyzer() {
readCsvFile()
macd := NewMacd()
rsi := NewRsi()
trend := NewTrend()
obv := NewObv()
priceClose, err := decimal.NewFromString("0")
volume, err := decimal.NewFromString("0")
check(err)
rsiB := false
@ivank2139
ivank2139 / HistoryAnalysisETH.txt
Created April 5, 2020 04:34
The report created by the Keiko Analyzer.
Initial Cash $1000, Initial Eth 0, Initial Portfolio value $1000
Buy recommendation 286.03 Eth at price 0.87, cost $250 on 2015-09-14
After trade, cash available $750, Crypto available 286.03, portfolio total $1000
Buy recommendation 321.58 Eth at price 0.58, cost $187.5 on 2015-09-28
After trade, cash available $562.5, Crypto available 607.61, portfolio total $916.77
Buy recommendation 319.77 Eth at price 0.44, cost $140.62 on 2015-10-21
After trade, cash available $421.88, Crypto available 927.38, portfolio total $829.71