Great discount if you pay using cryptocurrencies! Bitcoin, Litecoin & Dash accepted.

LOGIN

There are multiple ideas that you can use to trade with Ichimoku Cloud, we’ll trade using Tenkan over Kijun cross along with using the color of the ichimoku cloud at given candle.

We need to install custom indicators, you can read here how to do so.

Strategy

The strategy is fairly simple, we will use the timeframe of 15 minutes and will buy when Tenkan crosses Kijun and the Ichimoku Cloud is Red, it will then take profits at 100% or trail the stop loss to 5% from entry price as soon as it reaches 20% from initial buy price.

The trailing stop will only start after the price reaches 20% and it will keep trailing with highest reached price until its either stopped or the pair reaches a 100% from entry.

This is how the strategy would look like on tradingview:

Whoops, this content is for members only. If you have a membership, please log in. If not, you can definitely get access by buying one of our plans! Purchase the essential plan or Purchase the Professional Plan .

Instructions

After the installation it should be fairly simple. Copy test_strategy.py located on freqtrade/user_data/strategies to ichimoku.py:

user@computer:~/freqtrade$ cp user_strategies/strategies/test_strategy.py user_strategies/strategies/ichimoku.py 

After that, modify the ichimoku.py with your preferred editor. Add the following line below import numpy:

from technical.indicators import ichimoku

Modify the class name to ichis, it will look like this:

class ichis(IStrategy):

For roi and stop-loss, we’ll use the following settings:

    minimal_roi = {
        "0": 1
    }
    stoploss = -0.1

    trailing_stop = True
    trailing_stop_positive = -0.15
    trailing_stop_positive_offset = 0.20
    trailing_only_offset_is_reached = True

This means that the strategy will take profit at 100% profit, initially it will set a stop loss of -10% and will trail the stop when it reaches 20% profits by moving the stop-loss to -15% from the 20% point, and then it will trail it with the highest reached price.

Find the function def populate_indicators and add the following lines:

        ichi=ichimoku(dataframe)
        dataframe['tenkan']=ichi['tenkan_sen']
        dataframe['kijun']=ichi['kijun_sen']
        dataframe['senkou_a']=ichi['senkou_span_a']
        dataframe['senkou_b']=ichi['senkou_span_b']
        dataframe['cloud_green']=ichi['cloud_green']
        dataframe['cloud_red']=ichi['cloud_red']

Find the def populate_buy_trend function and add:

    def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                (dataframe['tenkan'].shift(1)<dataframe['kijun'].shift(1)) &
                (dataframe['tenkan']>dataframe['kijun']) &
                (dataframe['cloud_red']==True)
            ),
            'buy'] = 1
        return dataframe

For the function def populate_sell_trend you can leave it empty as we’ll use ROI or Trailing stop-loss to sell the position rather than a specific sell trigger. It should look like this:

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
            ),
            'sell'] = 1
        return dataframe
You can create your own sell conditions on bearish Tenkan over Kijun cross or use a simple smacross! Try it and let us know how it goes in the comments.

Now you should be able to backtest the strategy and modify accordingly to your preferences. You can read more about backtesting here and about the ichimoku cloud here.

2 Comments
  • berlinguyinca
    12:31 AM, September 2019

    credit should be given to the codes of freqtrade a d technical

    • CryptoCue
      3:06 AM, September 2019

      Hey Berlinguyinca, we appreaciate the work from freqtrade along with your own repository. We do cite the freqtrade technical github in the post where we explain how to add custom indicators.

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google
Spotify
Consent to display content from Spotify
Sound Cloud
Consent to display content from Sound
Cart Overview