TradingView
Trading_Nerd
27 mar 2022 10:35

Ichimoku Cloud [Trading Nerd] 

Bitcoin / U.S. dollarBitstamp

Opis

Backtesting Script that compares different way to trade the Ichimoku Cloud. With this script you can test 2*2 different Ichimoku Cloud Entry conditions, more on that down below. This script is useful to figure out what conditions work best for the applied market (so not only parameters of the Ichimoku Cloud are changeable).

Strategy foundation
This conditions need to be always satisfied for a valid entry:
Longs:
  • The close price must be above the (displaced) cloud: close > max(leadingspanA[displacement], leadingspanB[displacement])
  • The most recent cloud must be green: leadingspanA > leadingspanB


Shorts:
  • The close price must be below the (displaced) cloud: close < min(leadingspanA[displacement], leadingspanB[displacement])
  • The most recent cloud must be red: leadingspanA < leadingspanB


Options for Conversion-/Base Line
Cross: Conversion-Line cross-over Base-Line (Long), Conversion Line cross-under Base-Line (Short)
Over/Under: Conversion-Line > Base-Line (Long), Conversion-Line < Base-Line (Short)

Options for Lagging Span
Above/Below Price: Lagging-Span > Close Price (Long), Lagging-Span < Close Price (Short)
Above/Below Cloud: Lagging-Span > Ichimoku Cloud (Long), Lagging-Span < Ichimoku Cloud (Short)

Exit Conditions
An optional Stoploss is available. 2 different Types:
ATR: Takes a multiple (set by 'ATR multiplier for SL') of the ATR and subtract it (Long) or adds it (Short) to the close price of the previous candel (before entry candle)
HH/LL: Takes the highest high/lowest low of the last X candles (set by 'Lookback Range for HH/LL SL') and sets a SL at this price
none: There is no SL.

The position is at latest exited at the next cross of the Conversion-Line and Base-Line!
Longs: Conversion-Line cross-under Base-Line.
Shorts: Conversion-Line cross-over Base-Line.
The position is closed if the cross is confirmed (candle has closed).

Risk Management
You can set the risk percent per trade:
Risk only X% of current capital (initial capital + net Profit). This requires a Stoploss-Strategy (not none).
IMPORTANT: For low Timeframes and Markets with tight SL (like Forex) it requires a lower Margin Percent than default. Go to Settings->Properties and lower the required Long/Short Margin. Otherwise Trades might not be considered because of too less capital/marign. Margins can e.g. set to: 2% (Forex), 10% (Stocks), 20% (Crypto).
Komentarze
Ichimoku-Trading
Great work! Would you share your code?
ichimokuin
Some suggestions, Long alert should be there only when price is above conversion line & base line. Also, It would be great to have a zigzag and the option to give long or short alerts only on the zigzag.
ichimokuin
Great work! It would be great to see a scanner that scans say 40 stocks and uses this screener to alert of breakouts
Więcej