This file contains 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
func testing(t int, xc[]float64)float64{ | |
//rs := float64(0) | |
totalGain := float64(0) | |
totalLoss := float64(0) | |
if len(xc) > t { | |
xc = xc[0:t] | |
} | |
for i := 1; i < len(xc); i++ { | |
previous := xc[i] | |
current := xc[i-1] |
This file contains 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
import ( | |
"context" | |
"fmt" | |
"math" | |
"strconv" | |
"time" | |
"github.com/adshao/go-binance" | |
) |
This file contains 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
import( | |
"math" | |
) | |
func rc(t int, x []float64) float64 { | |
if len(x)-2 < t { | |
return 0 | |
} | |
s := float64(0) | |
for j := 0; j < t; j++ { |
This file contains 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
func rc(t int, x []float64) float64 { | |
if len(x)-2 < t { | |
return 0 | |
} | |
s := float64(0) | |
for j := 0; j < t; j++ { | |
s += x[j] - x[j+1] | |
} | |
return (s / float64(t)) | |
} |
This file contains 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
func rc(t int, x []float64) float64 { | |
if len(x)-2 < t { | |
return 0 | |
} | |
s := float64(0) | |
for j := 0; j < t; j++ { | |
s += x[j] - x[j+1] | |
} | |
return (s / float64(t)) | |
} |
This file contains 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
// TRADES ON DROP REBOUNDS TOM 20-1 | |
index = BNCE_XBTUSD; | |
magnTresh = index[0]/500 // start trading from this drop magnitude | |
magnSpeed = magnTresh/100 // minimal consistent change per second | |
function rc(t, x){ | |
x = x.slice(0,t+1); s = 0; | |
for(j=0;j<x.length-1;j++){ | |
s += x[j]-x[j+1]; |
This file contains 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
// BREAKOUT CLEAN | |
function sma(t, xc){ | |
som=0; xc=xc.slice(0,t); | |
for(i=0;i<xc.length;i++){som+=xc[i];} | |
return som/xc.length; | |
} | |
function pricemove (t, xc){ | |
//xc=xc.slice(0,150); |
This file contains 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
// BREAKOUT CLEAN MAC | |
function sma(t, xc){ | |
som=0; xc=xc.slice(0,t); | |
for(i=0;i<xc.length;i++){som+=xc[i];} | |
return som/xc.length; | |
} | |
function pricemove (t, xc){ | |
return xc[0]-xc[t]; |
This file contains 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
// BREAKOUT CLEAN | |
function sma(t, xc){ | |
som=0; xc=xc.slice(0,t); | |
for(i=0;i<xc.length;i++){som+=xc[i];} | |
return som/xc.length; | |
} | |
function pricemove (t, xc){ | |
return xc[0]-xc[t]; |
This file contains 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
// BREAKOUT CLEAN | |
function sma(t, xc){ | |
som=0; xc=xc.slice(0,t); | |
for(i=0;i<xc.length;i++){som+=xc[i];} | |
return som/xc.length; | |
} | |
function pricemove (t, xc){ | |
return xc[0]-xc[t]; |
NewerOlder