From 1e5df9611b92fc64f898d6e59a5ae5f28b0b9552 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Sat, 8 Oct 2022 13:31:52 +0200 Subject: [PATCH] improve wording, move warning --- docs/freqai-spice-rack.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/freqai-spice-rack.md b/docs/freqai-spice-rack.md index fa32ccbed..ec0baad16 100644 --- a/docs/freqai-spice-rack.md +++ b/docs/freqai-spice-rack.md @@ -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