Creating a strategy using the Ichimoku indicator on Mudrex

Edul Patel
Mudrex
Published in
6 min readNov 12, 2019

The Ichimoku indicator was published in 1969 by a reporter, Ichimoku Kinkou Hyo, in Japan. This candlestick trading technique has stood the test of time. The name Ichimoku tells a lot about the trading system, or at least it gives a description of the system.

Ichimoku = “One look, glance”.

Kinkou = “Balance, equilibrium”.

Hyo = “Chart, Graph”

Let’s look at how we can use it in a practical strategy and make some money

Introduction

The Ichimoku Cloud is an indicator designed to tell you everything you need to know about a price trend, including its direction, momentum, dynamic support and resistance levels, and even trade signals. It consists of 6 lines

  1. Tenkan-Sen line, also called the Conversion Line, represents the midpoint of the last 9 candlesticks. It’s calculated with the following Ichimoku formula: [(9-period high + 9-period low)/2].
  2. Kijun-Sen line, also called the Base Line, represents the midpoint of the last 26 candlesticks. It’s calculated with the following formula: [(26-period high + 26-period low)/2].
  3. Chiou Span, also called the Lagging Span, lags behind the price (as the name suggests). The Lagging Span is plotted 26 periods back.
  4. Senkou Span A, also called the Leading Span A, represents one of the two Cloud boundaries and it’s the midpoint between the Conversion Line and the Base Line: [(Conversion Line + Base Line)/2]. This value is plotted 26 periods into the future and it’s the faster Cloud boundary.
  5. Senkou Span B, or the Leading Span B, represents the second Cloud boundaries and it’s the midpoint of the last 52 price bars: [(52-period high + 52-period low)/2]. This value is plotted 52 periods into the future and it’s the slower Cloud boundary.
  6. Chikou Span, represents the closing price and is plotted 26 days back. The Chikou Span is best used for visual understanding and very limited use in automating

How to use Ichimoku

You can use the Ichimoku strategy both for bearish and bullish strategies. Lets first define how to do it in a ‘bullish scenario’

  • Rule #1: Price above the cloud

Ichimoku cloud trading requires the price to trade above the Cloud. This is because it’s a bullish signal and potentially the beginning of a new up-trend.

The cloud is built to highlight support and resistance levels. It highlights several layers deep because support and resistance is not a single line drawn in the sand. So, when we break above or below the Ichimoku Cloud, it signals a deep shift in the market sentiment. And this is thus the beginning of our transition. We will now look for more confirmation.

  • Rule # 2: Conversion line crosses above base line

The price breakout above the Cloud needs is followed by the crossover of the Conversion Line above the Base Line. Once these two conditions are fulfilled, we can look to enter a trade.

  • Rule #3 Setup a stop loss

The next important thing we need to establish is where to place our protective stop loss. First, it’s significantly lowering the risk of losing big money. Second, it helps us trade with the market order flow.

You would want to ideally set up a stop loss at ~ 1–2% below the entry price

  • Rule #4 Setup a Take Profit

We only need one simple condition to be satisfied with our take profit strategy. When the conversion line crosses below the baseline we want to take profits and exit our trade.

Taking a winning trade on Mudrex

Building on Mudrex

Ichimoku cloud trading requires a lot of self-discipline. This is because you have to wait for the best trade signals. The Mudrex platform helps traders automate their trading and hence helps you execute your trading without the need to maintain this discipline!

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ To create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do

Buy when

  • Price > Cloud (i.e Price > Leading span A and Price > Leading span B)
  • Conversion line crosses up Base line

Exit when

  • Stoploss: Price drops 2% from entry
  • Take Profit: Conversion line crosses down Base line

To make the first condition all you need 2 ‘compare’ blocks to compare the ‘Price’ and the Ichimoku lines. One will have Price > Leading span A and the other Price > Leading Span B.

Price > Leading Span A

You can then connect the two compare blocks together with an ‘AND’ block.

Price > Cloud

You then need another compare block to check if when the Conversion line crosses up the Base line. Once setup, you can connect both these set of blocks to the ‘Buy’ block to create our entry condition.

Entry condition for Ichimoku

For exit, we need to have a take profit condition where we use a compare block for ‘Conversion line crossed down Base line’.

Conversion line crosses down the baseline

And lastly, we setup the Stop Loss by clicking on the “Stop Loss” block.

Overall the strategy looks like this:

Complete Ichimoku Strategy

There we go!

We can now run a quick backtest to see how our strategy performs. Running one form 12th Aug to 12th Nov 2019 gives us some pretty good results!

Bonus

Just like we made a ‘Buy’ specific conditions, using the exact opp conditions for shorting can significantly improve the strategy performance.

Short when

  • Price <Cloud (i.e Price < Leading span A and Price < Leading span B)
  • Conversion line crosses down Base line

Exit when

  • Stoploss: Price drops 2% from entry
  • Take Profit: Conversion line crosses up Base line

Below is how the combined strategy will look:

Ichimoku based long- short strategy

A quick backtest on the long-short version on gives us 5x the returns as compared to the long-only version

A lot of even more complex things can be done on Mudrex! Signup today!

Links

A few quick references below:

Happy Trading!

--

--

Edul Patel
Mudrex
Editor for

Building Mudrex.com. We help traders automate their trading strategies without writing code Check us at