improve wording, move warning

This commit is contained in:
robcaulk 2022-10-08 13:31:52 +02:00
parent f3dcbb9736
commit 1e5df9611b

View File

@ -1,5 +1,8 @@
# Using the `spice_rack`
!!! Note:
`spice_rack` indicators should not be used exclusively for entries and exits, the following example is just a demonstration of syntax. `spice_rack` indicators should **always** be used to support existing strategies).
The `spice_rack` is aimed at users who do not wish to deal with setting up `FreqAI` confgs, but instead prefer to interact with `FreqAI` similar to a `talib` indicator. In this case, the user can instead simply add two keys to their config:
```json
@ -17,7 +20,7 @@ Which tells `FreqAI` to set up a pre-set `FreqAI` instance automatically under t
self.freqai.close_spice_rack() # user must close the spicerack
```
Users can then use these columns, concert with all their own additional indicators added to `populate_indicators` in their entry/exit criteria and strategy callback methods the same way as any typical indicator (note: `spice_rack` indicators should not be used exclusively for entries and exits, the following example is just a demonstration of syntax. `spice_rack` indicators should **always** be used to support existing strategies). For example:
Users can then use these columns, concert with all their own additional indicators added to `populate_indicators` in their entry/exit criteria and strategy callback methods the same way as any typical indicator. For example:
```python
def populate_entry_trend(self, df: DataFrame, metadata: dict) -> DataFrame:
@ -25,14 +28,14 @@ Users can then use these columns, concert with all their own additional indicato
df.loc[
(
(df['dissimilarity_index'] < 1) &
(df['extrema'] > 0.1)
(df['extrema'] < -0.1)
),
'enter_long'] = 1
df.loc[
(
(df['dissimilarity_index'] < 1) &
(df['extrema'] <> -0.1)
(df['extrema'] > 0.1)
),
'enter_short'] = 1