pinets 0.1.33 → 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 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, Providers } from '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.ta;
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