Skip to content

Commit

Permalink
stage
Browse files Browse the repository at this point in the history
  • Loading branch information
rylorin committed Mar 13, 2024
1 parent c0c6e30 commit 157f5bf
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 1,922 deletions.
146 changes: 73 additions & 73 deletions dist/custom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,6 @@ declare class ForceIndex extends Indicator {
nextValue(price: CandleData): number | undefined;
}
declare function forceindex(input: ForceIndexInput): number[];
declare class VWAPInput extends IndicatorInput {
high: number[];
low: number[];
close: number[];
volume: number[];
}
declare class VWAP extends Indicator {
result: number[];
generator: IterableIterator<number>;
constructor(input: VWAPInput);
static calculate: typeof vwap;
nextValue(price: CandleData): number;
}
declare function vwap(input: VWAPInput): number[];
declare class AvgGainInput extends IndicatorInput {
period: number;
values: number[];
}
declare class AverageGain extends Indicator {
generator: IterableIterator<number | undefined>;
constructor(input: AvgGainInput);
static calculate: typeof averagegain;
nextValue(price: number): number | undefined;
}
declare function averagegain(input: AvgGainInput): number[];
declare class VolumeProfileInput extends IndicatorInput {
high: number[];
open: number[];
Expand All @@ -58,6 +33,20 @@ declare class VolumeProfile extends Indicator {
nextValue(price: CandleData): number | undefined;
}
declare function volumeprofile(input: VolumeProfileInput): number[];
declare class VWAPInput extends IndicatorInput {
high: number[];
low: number[];
close: number[];
volume: number[];
}
declare class VWAP extends Indicator {
result: number[];
generator: IterableIterator<number>;
constructor(input: VWAPInput);
static calculate: typeof vwap;
nextValue(price: CandleData): number;
}
declare function vwap(input: VWAPInput): number[];
declare class AvgLossInput extends IndicatorInput {
values: number[];
period: number;
Expand All @@ -69,6 +58,17 @@ declare class AverageLoss extends Indicator {
nextValue(price: number): number | undefined;
}
declare function averageloss(input: AvgLossInput): number[];
declare class AvgGainInput extends IndicatorInput {
period: number;
values: number[];
}
declare class AverageGain extends Indicator {
generator: IterableIterator<number | undefined>;
constructor(input: AvgGainInput);
static calculate: typeof averagegain;
nextValue(price: number): number | undefined;
}
declare function averagegain(input: AvgGainInput): number[];
/**
* Created by AAravindan on 5/4/16.
*/
Expand Down Expand Up @@ -116,28 +116,6 @@ declare function heikinashi(input: HeikinAshiInput): CandleList;
* @returns {number[]}
*/
declare function fibonacciretracement(start: number, end: number): number[];
declare class IchimokuCloudInput extends IndicatorInput {
high: number[];
low: number[];
conversionPeriod: number;
basePeriod: number;
spanPeriod: number;
displacement: number;
}
declare class IchimokuCloudOutput {
conversion: number;
base: number;
spanA: number;
spanB: number;
}
declare class IchimokuCloud extends Indicator {
result: IchimokuCloudOutput[];
generator: IterableIterator<IchimokuCloudOutput | undefined>;
constructor(input: IchimokuCloudInput);
static calculate: typeof ichimokucloud;
nextValue(price: CandleData): IchimokuCloudOutput;
}
declare function ichimokucloud(input: IchimokuCloudInput): IchimokuCloudOutput[];
declare class KeltnerChannelsInput extends IndicatorInput {
maPeriod: number;
atrPeriod: number;
Expand Down Expand Up @@ -178,6 +156,28 @@ declare class ChandelierExit extends Indicator {
nextValue(price: ChandelierExitInput): ChandelierExitOutput | undefined;
}
declare function chandelierexit(input: ChandelierExitInput): number[];
declare class IchimokuCloudInput extends IndicatorInput {
high: number[];
low: number[];
conversionPeriod: number;
basePeriod: number;
spanPeriod: number;
displacement: number;
}
declare class IchimokuCloudOutput {
conversion: number;
base: number;
spanA: number;
spanB: number;
}
declare class IchimokuCloud extends Indicator {
result: IchimokuCloudOutput[];
generator: IterableIterator<IchimokuCloudOutput | undefined>;
constructor(input: IchimokuCloudInput);
static calculate: typeof ichimokucloud;
nextValue(price: CandleData): IchimokuCloudOutput;
}
declare function ichimokucloud(input: IchimokuCloudInput): IchimokuCloudOutput[];
class StockData {
open: number[];
high: number[];
Expand Down Expand Up @@ -232,6 +232,21 @@ declare function ema(input: MAInput): number[];
calculatePeriodHigh(): void;
calculatePeriodLow(): void;
}
declare class MAInput extends IndicatorInput {
period: number;
values: number[];
constructor(period: number, values: number[]);
}
declare class SMA extends Indicator {
period: number;
price: number[];
result: number[];
generator: IterableIterator<number | undefined>;
constructor(input: MAInput);
static calculate: typeof sma;
nextValue(price: number): number | undefined;
}
declare function sma(input: MAInput): number[];
declare class IndicatorInput {
reversedInput?: boolean;
format?: (data: number) => number;
Expand All @@ -252,21 +267,6 @@ declare class Indicator {
static reverseInputs(input: any): void;
getResult(): any;
}
declare class MAInput extends IndicatorInput {
period: number;
values: number[];
constructor(period: number, values: number[]);
}
declare class SMA extends Indicator {
period: number;
price: number[];
result: number[];
generator: IterableIterator<number | undefined>;
constructor(input: MAInput);
static calculate: typeof sma;
nextValue(price: number): number | undefined;
}
declare function sma(input: MAInput): number[];
declare class ATRInput extends IndicatorInput {
low: number[];
high: number[];
Expand Down Expand Up @@ -301,6 +301,17 @@ declare class LinkedList {
resetCursor(): this;
next(): any;
}
declare function format(v: number): number;
declare class WEMA extends Indicator {
period: number;
price: number[];
result: number[];
generator: IterableIterator<number | undefined>;
constructor(input: MAInput);
static calculate: typeof wema;
nextValue(price: number): number | undefined;
}
declare function wema(input: MAInput): number[];
declare class TrueRangeInput extends IndicatorInput {
low: number[];
high: number[];
Expand All @@ -314,16 +325,5 @@ declare class TrueRange extends Indicator {
nextValue(price: CandleData): number | undefined;
}
declare function truerange(input: TrueRangeInput): number[];
declare function format(v: number): number;
declare class WEMA extends Indicator {
period: number;
price: number[];
result: number[];
generator: IterableIterator<number | undefined>;
constructor(input: MAInput);
static calculate: typeof wema;
nextValue(price: number): number | undefined;
}
declare function wema(input: MAInput): number[];
declare function setConfig(key: any, value: any): void;
declare function getConfig(key: any): any;
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"cover": "babel-istanbul --include-all-sources cover -x dist/**/*.* ./node_modules/mocha/bin/_mocha -- -R spec && open coverage/lcov-report/index.html",
"generateDts": "./generateTsDefinitions.sh",
"start": "sh test.sh",
"test": "mocha --require babel-core/register --require babel-polyfill",
"test": "mocha --recursive --require babel-core/register --require babel-polyfill",
"test:watch": "mocha --watch --require babel-core/register --require babel-polyfill"
},
"dependencies": {
Expand All @@ -117,8 +117,6 @@
"@babel/core": "^7.24.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-terser": "^0.4.4",
"@types/chai": "^4.3.12",
"@types/mocha": "^2.0.0",
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-plugin-external-helpers": "^6.22.0",
Expand All @@ -129,16 +127,13 @@
"babel-register": "^6.8.0",
"babel-runtime": "^6.23.0",
"bl": "^6.0.12",
"chai": "^5.1.0",
"draw-candlestick": "2.0.3",
"dts-bundle": "^0.7.3",
"gulp": "^3.9.1",
"gulp-mocha": "^7.0.2",
"gulp-util": "^1.0.0",
"inquirer": "^9.2.16",
"koa": "^2.15.0",
"koa-static": "^5.0.0",
"lit-html": "^3.1.2",
"mocha": "^10.3.0",
"monaco-editor": "^0.47.0",
"rimraf": "^5.0.5",
"rollup": "^1.26.3",
Expand Down
Loading

0 comments on commit 157f5bf

Please sign in to comment.