Today, I would like to share with you a strategy developed for the US Tech 100 index
This one relies on Ichimoku to validate the trend and give the signals to enter
Its objective is to follow the evolution of the price rise or fall in order to benefit from it.
It also aims to exit the position at the most favorable time to cash out regularly.
However, the objective remains a long-term one for annual performance.
The success of the backtest is based on the optimisation of the stop loss and the clear upward trend in the price.
Also, money management is in place to ensure that a crack addict does not destroy the entire portfolio.
//
//============================== Basic setting
defparam cumulateorders = false
//============================== Money Management
Capital = 10000
Lotss = Capital / 6000 // Value of risk on capital (attention)
//============================== setting Management
if Lotss < 0.5 then
Lotss = 0.5
endif
set stop loss (Capital*95)/100
set stop %loss 41
//============================== Indicator
SpanA = (Tenkan[26]+Kijun[26])/2
Tenkan = (highest[9](high)+lowest[9](low))/2
Kijun = (highest[26](high)+lowest[26](low))/2
SpanB = (highest[52](high[26])+lowest[52](low[26]))/2
timeframe(1hours)
XSpanA = (XTenkan[26]+XKijun[26])/2
XTenkan = (highest[9](high)+lowest[9](low))/2
XKijun = (highest[26](high)+lowest[26](low))/2
XSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
timeframe(default)
timeframe(4hours)
XXSpanA = (XXTenkan[26]+XXKijun[26])/2
XXTenkan = (highest[9](high)+lowest[9](low))/2
XXKijun = (highest[26](high)+lowest[26](low))/2
XXSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
timeframe(default)
//============================== setting trend Bullish
T1 = close > Kijun
T2 = close > SpanA and close > SpanB
TrendBullish1 = T1 and T2
timeframe(1hours)
T3 = close > XKijun
T4 = close > XSpanA and close > XSpanB
TrendBullish2 = T4 and T3
timeframe(default)
timeframe(4hours)
T5 = close > XXKijun
T6 = close > XXSpanA and close > XXSpanB
TrendBullish3 = T5 and T6
timeframe(default)
TrendBullish = TrendBullish1 and TrendBullish2 and TrendBullish3
//============================== setting Signal
S1 = low =< Kijun
S2 = low =< SpanA
S3 = low =< SpanB
S = S1 or S2 or S3
Signal = TrendBullish and S
//============================== setting Buy
if Signal then
buy lotss contract at market
endif
if close < kijun and close > positionprice then
sell at market
endif
Thanks a lot for sharing this new strategy. I moved it from the pending library posts to the forum because I think that there might be a problem in the way you calculate the stoploss at line 18? I don’t understand why you take the money capital to calculate the stoploss distance in points? 🙂 Sorry if I’m wrong!
Hello Nicolas, indeed, it is not conventional…
However, it is a method I use to use a %Stop
In limited risk CFD account, this kind of stop are not accessible, surprisingly, if I place a normal stop then a %stop it works…
It’s adapting to the limited risk account.