@backtest-kit/pinets 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +11 -0
- package/build/index.mjs +11 -1
- package/package.json +1 -1
- package/types.d.ts +5 -2
package/build/index.cjs
CHANGED
|
@@ -726,6 +726,16 @@ async function dumpPlotData(signalId, plots, mapping, taName, outputDir = "./dum
|
|
|
726
726
|
return await pine.pineMarkdownService.dump(signalId, plots, mapping, taName, outputDir);
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
+
const TO_MARKDOWN_METHOD_NAME = "markdown.toMarkdown";
|
|
730
|
+
async function toMarkdown(signalId, plots, mapping) {
|
|
731
|
+
pine.loggerService.log(TO_MARKDOWN_METHOD_NAME, {
|
|
732
|
+
signalId,
|
|
733
|
+
plotCount: Object.keys(plots).length,
|
|
734
|
+
mapping,
|
|
735
|
+
});
|
|
736
|
+
return await pine.pineMarkdownService.getReport(signalId, plots, mapping);
|
|
737
|
+
}
|
|
738
|
+
|
|
729
739
|
exports.AXIS_SYMBOL = AXIS_SYMBOL;
|
|
730
740
|
exports.Code = Code;
|
|
731
741
|
exports.File = File;
|
|
@@ -735,5 +745,6 @@ exports.getSignal = getSignal;
|
|
|
735
745
|
exports.lib = pine;
|
|
736
746
|
exports.run = run;
|
|
737
747
|
exports.setLogger = setLogger;
|
|
748
|
+
exports.toMarkdown = toMarkdown;
|
|
738
749
|
exports.toSignalDto = toSignalDto;
|
|
739
750
|
exports.usePine = usePine;
|
package/build/index.mjs
CHANGED
|
@@ -723,4 +723,14 @@ async function dumpPlotData(signalId, plots, mapping, taName, outputDir = "./dum
|
|
|
723
723
|
return await pine.pineMarkdownService.dump(signalId, plots, mapping, taName, outputDir);
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
|
|
726
|
+
const TO_MARKDOWN_METHOD_NAME = "markdown.toMarkdown";
|
|
727
|
+
async function toMarkdown(signalId, plots, mapping) {
|
|
728
|
+
pine.loggerService.log(TO_MARKDOWN_METHOD_NAME, {
|
|
729
|
+
signalId,
|
|
730
|
+
plotCount: Object.keys(plots).length,
|
|
731
|
+
mapping,
|
|
732
|
+
});
|
|
733
|
+
return await pine.pineMarkdownService.getReport(signalId, plots, mapping);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export { AXIS_SYMBOL, Code, File, dumpPlotData, extract, getSignal, pine as lib, run, setLogger, toMarkdown, toSignalDto, usePine };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/pinets",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Run TradingView Pine Script strategies in Node.js self hosted environment. Execute existing Pine Script indicators and generate trading signals with 1:1 syntax compatibility via PineTS runtime.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
package/types.d.ts
CHANGED
|
@@ -83,8 +83,11 @@ interface IParams {
|
|
|
83
83
|
}
|
|
84
84
|
declare function getSignal(source: File | Code, { symbol, timeframe, limit }: IParams): Promise<ISignalDto | null>;
|
|
85
85
|
|
|
86
|
+
type ResultId$3 = string | number;
|
|
87
|
+
declare function dumpPlotData<M extends PlotMapping>(signalId: ResultId$3, plots: PlotModel, mapping: M, taName: string, outputDir?: string): Promise<void>;
|
|
88
|
+
|
|
86
89
|
type ResultId$2 = string | number;
|
|
87
|
-
declare function
|
|
90
|
+
declare function toMarkdown<M extends PlotMapping>(signalId: ResultId$2, plots: PlotModel, mapping: M): Promise<string>;
|
|
88
91
|
|
|
89
92
|
type ResultId$1 = string | number;
|
|
90
93
|
interface SignalData {
|
|
@@ -185,4 +188,4 @@ declare const pine: {
|
|
|
185
188
|
loggerService: LoggerService;
|
|
186
189
|
};
|
|
187
190
|
|
|
188
|
-
export { AXIS_SYMBOL, type CandleModel, Code, File, type ILogger, type IPine, type IProvider, type PlotExtractConfig, type PlotMapping, type PlotModel, type PlotRecord, type SymbolInfoModel, type TPineCtor, dumpPlotData, extract, getSignal, pine as lib, run, setLogger, toSignalDto, usePine };
|
|
191
|
+
export { AXIS_SYMBOL, type CandleModel, Code, File, type ILogger, type IPine, type IProvider, type PlotExtractConfig, type PlotMapping, type PlotModel, type PlotRecord, type SymbolInfoModel, type TPineCtor, dumpPlotData, extract, getSignal, pine as lib, run, setLogger, toMarkdown, toSignalDto, usePine };
|