0.0.114 • Published 6 months ago

indicator-oracle-self-memetic v0.0.114

Weekly downloads
-
License
GPL
Repository
-
Last release
6 months ago

indicator-oracle-self-memetic

predict future price action using historic price action. meant for ohlcv candles but can also be used for regular time series if we present it as candles each with a .close field...

finds 'similar moments in history' and scale-shift fits them to the current movement, then takes a weighted vote of the 'historic moments' based on MSE to guess the future movement.

gets slower but better the longer it runs.

here is a demo video based on the included test-oracle-create-video.js

Experimental, use at your own risk

Remember, past performance is not necessarily indicative of future results!

Installation

npm i indicator-oracle-self-memetic

Usage

var {processCandlesFull} = require('indicator-oracle-self-memetic');
var doUseHeiken = true;
var candlesFull = require('candles-sample-aapl').loadNMinuteCandles(30);//.slice(-1000);
if(doUseHeiken){candlesFull = require("heikinashi")(candlesFull);}

console.log('got candles',candlesFull.length);

var topN = 10; //how many 'historic votes' to take on the future
var futurePeriods = 5; //how many periods forward to try to predict
var windowSize = 100;

//processCandlesFull(candlesFull, windowSize=100, topN=10, futurePeriods=5, addChartCandy=false, verbose=false, skipFirstN=0, earlyStopIndex=candlesFull.length+1)
candlesFull = processCandlesFull(candlesFull, windowSize, topN, futurePeriods);

console.log(candlesFull.slice(-1)[0]);

// {
//     date: '2022-12-02T20:00',
//     open: 146.4554275041246,
//     high: 147.96,
//     low: 146.4554275041246,
//     close: 147.4468,
//     bid: 146.95,
//     ask: 146.96,
//     volume: 4031053,
//     nSrcCandles: 17,
//     selfMemeData: {
//         oracleVote: 146.92831503349475, //<< used internally, changes whenever its within the window.
//         oracleFuture: 147.02862909770613, //<< used internally, changes whenever its within the window
//         oracleVoteHistoric: 146.92831503349475, //<< historic record of first 'expected from history' value [weighted-averaged historic value] recorded at this candle
//         oracleFutureHistoric: 147.02862909770613, //<< historic record of first 'prediction' value [forward-shifted 'expectations from history']
//         oracleFuturePrediction: 147.54711406421137 //<< close price + difference between (future-current) expectations. this is our 'indicator'.
//     }
// }

stonks

0.0.114

6 months ago

0.0.113

7 months ago

0.0.112

7 months ago

0.0.111

7 months ago

0.0.11

7 months ago

0.0.1

7 months ago