pinets 0.1.34 → 0.2.0
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/README.md +7 -5
- package/dist/pinets.dev.browser.js +619 -473
- package/dist/pinets.dev.cjs +619 -473
- package/dist/pinets.dev.cjs.map +1 -1
- package/dist/pinets.dev.es.js +617 -471
- package/dist/pinets.dev.es.js.map +1 -1
- package/dist/pinets.min.browser.js +12 -12
- package/dist/pinets.min.cjs +10 -10
- package/dist/pinets.min.es.js +2 -2
- package/dist/types/Context.class.d.ts +1 -0
- package/dist/types/PineTS.class.d.ts +0 -3
- package/dist/types/marketData/Binance/BinanceProvider.class.d.ts +4 -0
- package/dist/types/namespaces/PineMath.d.ts +1 -0
- package/dist/types/namespaces/TechnicalAnalysis.d.ts +19 -19
- package/dist/types/transpiler/ScopeManager.class.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,16 +96,14 @@ _oo = math.abs(open[1] - close[2]);
|
|
|
96
96
|
### Running PineTS Code
|
|
97
97
|
|
|
98
98
|
```javascript
|
|
99
|
-
import { PineTS,
|
|
99
|
+
import { PineTS, Provider } from 'pinets';
|
|
100
100
|
|
|
101
101
|
// Initialize with market data
|
|
102
|
-
|
|
103
|
-
const pineTS = new PineTS(Providers.Binance, 'BTCUSDT', 'D', 100);
|
|
102
|
+
const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', 'D', 100);
|
|
104
103
|
|
|
105
104
|
// Run your indicator
|
|
106
105
|
const { result } = await pineTS.run((context) => {
|
|
107
|
-
const ta = context
|
|
108
|
-
const math = context.math;
|
|
106
|
+
const { ta, math } = context;
|
|
109
107
|
const { close, open } = context.data;
|
|
110
108
|
|
|
111
109
|
const ema9 = ta.ema(close, 9);
|
|
@@ -119,9 +117,13 @@ const { result } = await pineTS.run((context) => {
|
|
|
119
117
|
|
|
120
118
|
let _oo = open;
|
|
121
119
|
_oo = math.abs(open[1] - close[2]);
|
|
120
|
+
|
|
121
|
+
return { ema9, ema18, bull_bias, bear_bias };
|
|
122
122
|
});
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
+
> **📖 For detailed documentation on initialization options, parameters, and advanced usage, see the [Initialization and Usage Guide](https://alaa-eddine.github.io/PineTS/initialization-and-usage/)**
|
|
126
|
+
|
|
125
127
|
## Key Differences from Pine Script
|
|
126
128
|
|
|
127
129
|
1. **Variable Declaration**: Use JavaScript's `const`, `let`, and `var` instead of Pine Script's implicit declaration
|