fix
This commit is contained in:
29
README.md
29
README.md
@ -41,4 +41,31 @@ exits = exits | forced_exits_window
|
|||||||
exits.tail(20)
|
exits.tail(20)
|
||||||
```
|
```
|
||||||
|
|
||||||
`isrising(series,n)`,`isfalling(series, n)` - returns mask where the condition is satisfied of consecutive rising or falling elements
|
`isrising(series,n)`,`isfalling(series, n)` - returns mask where the condition is satisfied of consecutive rising or falling elements
|
||||||
|
|
||||||
|
## Indicators
|
||||||
|
|
||||||
|
Custom indicators in the `indicators` folder.
|
||||||
|
|
||||||
|
### Importing
|
||||||
|
```python
|
||||||
|
from ttools.vbtindicators import register_custom_inds
|
||||||
|
register_custom_inds(None, "override") #All indicators from the folder are automatically imported and registered.
|
||||||
|
register_custom_inds("CUVWAP", "override")#just one
|
||||||
|
```
|
||||||
|
|
||||||
|
After registration they can be listed and used
|
||||||
|
```python
|
||||||
|
vbt.IF.list_indicators("ttools")
|
||||||
|
vbt.phelp(vbt.indicator("ttools:CUVWAP").run)
|
||||||
|
|
||||||
|
vwap_cum_d = vbt.indicator("ttools:CUVWAP").run(s12_data.high, s12_data.low, s12_data.close, s12_data.volume, anchor=vbt.Default(value="D"), drag=vbt.Default(value=50), hide_default=True)
|
||||||
|
```
|
||||||
|
### Creating
|
||||||
|
|
||||||
|
To create custom indicators CUSTOMNAME.py in `indicators` folder is created containing varibles IND_CUSTOMNAME containing the Indicator Factory class.
|
||||||
|
|
||||||
|
### Available
|
||||||
|
|
||||||
|
- `CUVWAP` - Cumulative VWAP with anchor based on HLCC4 with optional rounding (hlcc4_round, def.3) and drag - warming period from previous anchor unit(def.0).
|
||||||
|
- `DIVERGENCE` - Various divergences between two timeseries (abs, relative, relative normalized, pct, abs pct)
|
||||||
|
|||||||
Reference in New Issue
Block a user