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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
<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 // |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Great work – i use the cloud in some of my auto systems and very reliable.
Thanks for the comment grizzly, I like the look of your position sizing coding but won’t use it because I don’t understand it unfortunately.
regards
Hi John, and nice to see you took the Ichimoku a step further:-) One thing though, I think the Rule1 should apply to exit conditions and not buy, because we want to let at least one bar pass before we take profit, so if there was a stoploss it would be in the zerobar. Anyway you don’t have any SL code, nor any zerobar trades so that’s good.
cheers Kasper
It doesn’t generate anything for me. And I can’t debug it, any tips?