SeaSide420

Ichimoku + Daily-Candle_X + HULL-MA_X + MacD

Ichimoku_cloud + Daily-Candle_cross(DT) + HuLL-MovingAverage_cross + MacD
any timeframe, all indicators settings adjustable for fine tuning to pair/timeframe
Target Point and Stop Loss settings
set SL low to reduce repaint
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
// Any timeFrame ok but good on 15 minute & 60 minute , Ichimoku + Daily-Candle_cross(DT) + HULL-MA_cross + MacD combination 420 special blend
strategy("Ichimoku + Daily-Candle_X + HULL-MA_X + MacD", shorttitle="٩(̾●̮̮̃̾•̃̾)۶", overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=720, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0)
keh=input(title="Double HullMA",type=integer,defval=14, minval=1)
dt = input(defval=0.0010, title="Decision Threshold (0.001)", type=float, step=0.0001)
SL = input(defval=-500.00, title="Stop Loss in $", type=float, step=1)
TP = input(defval=25000.00, title="Target Point in $", type=float, step=1)
ot=1
n2ma=2*wma(close,round(keh/2))
nma=wma(close,keh)
diff=n2ma-nma
sqn=round(sqrt(keh))
n2ma1=2*wma(close[1],round(keh/2))
nma1=wma(close[1],keh)
diff1=n2ma1-nma1
sqn1=round(sqrt(keh))
n1=wma(diff,sqn)
n2=wma(diff1,sqn)
b=n1>n2?lime:red
c=n1>n2?green:red
d=n1>n2?red:green
confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close[1]))/security(tickerid, 'D', close[1])
conversionPeriods = input(9, minval=1, title="Conversion Line Periods")
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods")
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
LS=close, offset = -displacement
MACD_Length = input(9)
MACD_fastLength = input(12)
MACD_slowLength = input(26)
MACD = ema(close, MACD_fastLength) - ema(close, MACD_slowLength)
aMACD = ema(MACD, MACD_Length)
closelong = n1<n2 and close<n2 and confidence<dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closelong)
    strategy.close("Long")
closeshort = n1>n2 and close>n2 and confidence>dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closeshort)
    strategy.close("Short")
longCondition = n1>n2 and strategy.opentrades<ot and confidence>dt and close>n2 and leadLine1>leadLine2 and open<LS and MACD>aMACD
if (longCondition)
    strategy.entry("Long",strategy.long)
shortCondition = n1<n2 and strategy.opentrades<ot and confidence<dt and close<n2 and leadLine1<leadLine2 and open>LS and MACD<aMACD
if (shortCondition)
    strategy.entry("Short",strategy.short)//                         /L'-, 
//                               ,'-.           /MM . .             /  L '-, 
//     .                    _,--dMMMM\         /MMM  `..           /       '-, 
//     :             _,--,  )MMMMMMMMM),.      `QMM   ,<>         /_      '-,' 
//     ;     ___,--. \MM(    `-'   )M//MM\       `  ,',.;      .-'* ;     .' 
//     |     \MMMMMM) \MM\       ,dM//MMM/     ___ < ,; `.      )`--'    / 
//     |      \MM()M   MMM)__   /MM(/MP'  ___, \  \ `  `. `.   /__,    ,' 
//     |       MMMM/   MMMMMM( /MMMMP'__, \     | /      `. `-,_\     / 
//     |       MM     /MMM---' `--'_ \     |-'  |/         `./ .\----.___ 
//     |      /MM'   `--' __,-  \""   |-'  |_,               `.__) . .F. )-. 
//     |     `--'       \   \    |-'  |_,     _,-/            J . . . J-'-. `-., 
//     |         __  \`. |   |   |         \    / _           |. . . . \   `-.  F 
//     |   ___  /  \  | `|   '      __  \   |  /-'            F . . . . \     '` 
//     |   \  \ \  /  |        __  /  \  |  |,-'        __,- J . . . . . \ 
//     |    | /  |/     __,-  \  ) \  /  |_,-     __,--'     |. .__.----,' 
//     |    |/    ___     \    |'.  |/      __,--'           `.-;;;;;;;;;\ 
//     |     ___  \  \     |   |  `   __,--'                  /;;;;;;;;;;;;. 
//     |     \  \  |-'\    '    __,--'                       /;;;;;;;;;;;;;;\ 
// \   |      | /  |      __,--'                             `--;;/     \;-'\ 
//  \  |      |/    __,--'                                   /  /         \  \ 
//   \ |      __,--'                                        /  /           \  \ 
//    \|__,--'                                          _,-;M-K,           ,;-;\ 
//                                                     <;;;;;;;;           '-;;;; 
//a1=plot(n1,color=c)
//a2=plot(n2,color=c)
//plot(cross(n1, n2) ? n1 : na, style = circles, color=b, linewidth = 4)
//plot(cross(n1, n2) ? n1 : na, style = line, color=d, linewidth = 4)
//plot(conversionLine, color=#0496ff, title="Conversion Line")
//plot(baseLine, color=#991515, title="Base Line")
//plot(close, offset = -displacement, color=#459915, title="Lagging Span")
//p1=plot (leadLine1, offset = displacement, color=green,  title="Lead 1")
//p2=plot (leadLine2, offset = displacement, color=red,  title="Lead 2")
//fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)
// remove the "//" from before the plot script if want to see the indicators on chart
ddp922
3 months ago
not bad with a few tweaks
snapshot
Reply
meepstone PRO
3 months ago
Is it possible to set alert for when it reaches a different position?
Reply
SeaSide420 PRO meepstone
3 months ago
no
sorry alerts only work on indicators
this is strategy
Perhaps TV team will add Alert function to strategies one day.
Reply
magpin
3 months ago
How does changing SL affect repainting? And how badly in general does it repaint? Because the chart looks very smooth, it just seems impossible that it works so good
Reply
SeaSide420 PRO magpin
3 months ago
it does not repaint too badly,but does repaint yes, you can know if its going to repaint if the price goes back again, so then refresh the page (F5)
simple fix

changing the SL means it will close that position as soon as price goes back, therefore not need to refresh page. just the chart gets a bit messy with opening and closing.
Reply
magpin SeaSide420
3 months ago
ok, thank you! Have you tried to trade using this strategy? And if so, were the results good?
Reply
SeaSide420 PRO magpin
3 months ago
yes i have used it on live accounts, and used it as a EA (automated trading program for MT4)
it was ok, but I recently made better one
it is called SS420FX
SS420FX

http://ss420fx.blogspot.co.nz
Reply
SeaSide420 PRO SeaSide420
3 months ago
actual results are around 60% profitable (as per MT4 EA results)
Reply
magpin SeaSide420
3 months ago
ok, thanks. will test it later
Reply
Monobinocular
19 days ago
Hello SeaSide! Could you kindly explain what logic does this strategy use? Im not a coder, so its a bit hard for me to catch the logic from the code.
Reply
SeaSide420 PRO Monobinocular
19 days ago
@Monobinocular, Mono & Bi ?
Ichimoku_cloud is an indicator, you can research how to use it.
Daily-Candle_cross(DT) is indicator, )if todays candle price value is lower than yesterdays candle close, then sell, buy is reverse(
HuLL-MovingAverage is an indicator, you can research how to use it.
MacD is and indicator is an indicator, you can research how to use it.
Reply
Monobinocular SeaSide420
3 days ago
@SeaSide420, Appreciate your feedback, and sorry for late reply.
Well, monobino is a quirk, heh…
And about the strategy: seems pretty clear about HullMAs and daily close. But what components of MACD and Ichi are used here, what signals do they generate? As I understand, MACD and Ichi work as filters for HullMA signals. They have to confirm price action at the moment of HullMA cross, right?
Reply
SeaSide420 PRO Monobinocular
3 days ago
@Monobinocular, the script is open, you can view it
Reply
Monobinocular SeaSide420
2 days ago
@SeaSide420, coding is like a rocket science for me, heh. But anyway thanks for this strategy idea.
Reply
SeaSide420 PRO Monobinocular
2 days ago
@Monobinocular, the ichimoku is above or below cloud condition (above cloud = buy, below cloud = sell)
the macD is is using the 2 macD MA's like a crossover

Reply
SeaSide420 PRO Monobinocular
19 days ago
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out