# indicator-oracle-self-memetic

> predict future price action using historic price action

Latest version **0.0.114** (published 2023-11-10) · GPL license · 0 weekly downloads

## Install

```sh
npm install indicator-oracle-self-memetic
pnpm add indicator-oracle-self-memetic
yarn add indicator-oracle-self-memetic
bun add indicator-oracle-self-memetic
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.114 |
| Published | 2023-11-10 |
| First published | 2023-10-21 |
| Weekly downloads | 0 |
| License | GPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | stonkpunk |
| Maintainers | stonkpunk |

## Links

- npm: https://www.npmjs.com/package/indicator-oracle-self-memetic
- Homepage: https://github.com/stonkpunk/my-npm-modules/tree/main/indicator-oracle-self-memetic
- npm.io page: https://npm.io/package/indicator-oracle-self-memetic

## Dependencies (1)

- [needle-haystack-1d](https://npm.io/package/needle-haystack-1d.md) ^0.0.112

## Recent versions

- 0.0.114 (latest) — 2023-11-10
- 0.0.113 — 2023-10-24
- 0.0.112 — 2023-10-24
- 0.0.111 — 2023-10-24
- 0.0.11 — 2023-10-21
- 0.0.1 — 2023-10-21

## README

# 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](https://www.youtube.com/watch?v=OsEEtuWUBLI) 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

```sh
npm i indicator-oracle-self-memetic
```

## Usage 

```javascript
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](https://i.imgur.com/UpDxbfe.png)](https://www.npmjs.com/~stonkpunk)

---
_Source: https://npm.io/package/indicator-oracle-self-memetic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
