I started out looking for a system that approaches entry when the Chikou is above/below the cloud on the same side of the cloud as price. I found this cut out both winning and losing trades but overall was not as profitable as ignoring the Chikou. In its place the system waits for the Tenkansen (TS) to be above the Kijunsen (KS) for a “buy” and the KS above TS for a “sell”. The reason for this is that this cuts out more fake outs. The system also avoids taking two “buys” or two “sells” in a row as I wanted to avoid runs approaching the end of their course.
The system is adaptable to a range of markets and I suggest you do your own research, I’ve made some minor alterations to the code to improve profitability on the Dax 30 minutes. The change is to trading times restricting them to 070000 to 210000 with last entry time as 150000. This improves the results by about 4.5%.( all UK times currently GMT +1hr.).
Would welcome some feedback from FX traders as the system appears more profitable than the Dax in relation to GBP/USD but I don’t trade FX so would welcome feedback from FX traders The equity curve seems very profitable in volatile situations as experienced recently on this pair but the equity curve hovers near breakeven for long periods
<br>//-------------------------------------------------------------------------
// Main code :ichimomu and exits from cloud
//Thanks to Nicolas and Elsborgtrading and many unnamed contributors
//on the prorealcode.com website who unknowingly built my knowledge up.
//
//
//-------------------------------------------------------------------------
defparam cumulateorders=false
defparam preloadbars=2000
ONCE a = 0
ONCE Tenkansen=0
ONCE Kijunsen=0
ONCE SenkouSpanA=0
ONCE SenkouSpanB=0
ONCE Bullish0=0
ONCE Bearish0= 0
NoMomentum1=0.5
candlesperiods=20
// Money Management
Capital = 10000
Risk = 0.02
StopLoss = 100 // Purely to identify initial risk
// Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
// ICHIMOKU comonents used
Tenkansen = (highest[9](high)+lowest[9](low))/2
Kijunsen = (highest[26](high)+lowest[26](low))/2
SenkouSpanA = (Tenkansen[26]+Kijunsen[26])/2
SenkouSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
Rule1 = (BarIndex-TradeIndex)>=1
// BUY conditions
Bullish0 = close > SenkouSpanA and close > SenkouSpanB and open < close and Tenkansen > Kijunsen
If ABS(highest[candlesperiods](high)-lowest[candlesperiods](low))< NoMomentum1 THEN
condition=0
Else
condition=1
endif
c1 = (a<=0)
IF condition and Bullish0 and Rule1 and c1 THEN
BUY PositionSize CONTRACTS AT MARKET
a=1
ENDIF
// SELL Conditions
Bearish0= close < SenkouSpanA and close < SenkouSpanB and close < open and Tenkansen < Kijunsen
c2 = (a>=0)
IF condition and Bearish0 and Rule1 and c2 THEN
SELLSHORT PositionSize CONTRACTS AT MARKET
a=-1
ENDIF
// CLOSE LONG
indicator1 = Kijunsen
indicator2 = close
c3 = (Indicator2 crosses under indicator1)
if LONGONMARKET and c3 then
SELL AT MARKET
ENDIF
//CLOSE SHORT
Indicator3 = Kijunsen
indicator4 = close
c4 = (indicator4 crosses over indicator3)
IF SHORTONMARKET and c4 then
EXITSHORT AT MARKET
endif
//