PowerX Strategy "PowerZ"

everything that doesn't belong elsewhere cometh here

Moderator: moderators

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

PowerX Strategy "PowerZ"

Postby IgazI » Mon Oct 10, 2022 3:17 am

I'm starting this thread so that nobody has to dig around for the code.

VERSION 2.1
Bodies Show The Way: BSW:

Code: Select all

//@version=5
indicator(title = "Bodies Show The Way", shorttitle = "BSW", overlay = true)
h = high
l = low
c = high
o = low
candleTransp = input(40, title= "Darkness")
plotDot = input(true,title= "Plot Dots?")
join_HTF = input(false, title = "Connect:", inline = "2")
peri = input("", title = "Time Frame", inline = "2")
x = time_close(timeframe.period)
y = time_close(peri)
z = x[1] == y[1] ? close[1] : na
plot(peri != "" ? z : na,color = color.new(color.blue,50), offset = -1, style = plot.style_circles, linewidth = 2, trackprice = true)
plot(join_HTF and peri != "" ? z : na,color = color.new(color.blue,45), offset = -1, style = plot.style_line, linewidth = 4, display = display.all - display.price_scale)

//-----Pointy Places-----//
//plot_TRI = input(false, title = "Display:", inline = "1")
//adj = input(0.0, title = "Adjust Triangles", inline = "1")

noTrend = input(color.white, title = "noTrend: Color", inline = "3")
noTrendTransp = input(90, title = "Transp ", inline = "3")
trend_CLR = close > high[1]? color.rgb(46, 112, 167) : close < low[1] ? color.red : noTrend
candleTransp := trend_CLR == noTrend ? noTrendTransp : candleTransp
//color.new(#26310d,70)
plotcandle(o,h,l,c, color = color.new(trend_CLR,candleTransp), wickcolor =color.rgb(107, 113, 133), bordercolor = color.new(trend_CLR,candleTransp), display = display.all - display.status_line - display.price_scale)
plot(plotDot?close:na, color = color.new(#e1e6eb, 40), style = plot.style_line, linewidth = 1, join = true, display = display.all - display.status_line)
plot(plotDot?close:na, color = color.new(color.orange, 45), style = plot.style_circles, linewidth = 4, join = false, display = display.all - display.price_scale - display.status_line)
plot(peri != "" and y[1]==x[1]?close[1]:na, offset = -1, color = color.new(color.blue, 0), style = plot.style_circles, linewidth = 4, join = false, display = display.all - display.price_scale - display.status_line)
plot(plotDot?close:na, color = color.new(color.white, 10), style = plot.style_circles, linewidth = 3, join = false,display = display.all - display.price_scale)
plot(peri != "" and y[1]==x[1]?close[1]:na, offset = -1, color = color.new(#26310d, 0), style = plot.style_circles, linewidth = 3, join = false, display = display.all - display.price_scale - display.status_line)

//-----Pointy Places-----//
//fh = h
//fl = l
//cond1 = close[2] > close[3] and close[2] > close[4] and close[2] > close[5] and close[2] > close[6] and close[2] >= close[1] and close[2] >= close[0] // is highest of 5, is >= 2 to the right.
//cond2 = close[2] < close[3] and close[2] < close[4] and close[2] < close[5] and close[2] < close[6] and close[2] <= close[1] and close[2] <= close[0] // is lowest of 5, is <= 2 to the right.
//plotchar(plot_TRI and cond1 ? fh[2] + adj : na, char = "⬜", color = color.new(#26310d,82), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
//plotchar(plot_TRI and cond2 ? fl[2] - adj : na, char = "⬜", color = color.new(#26310d,82), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
//plotchar(plot_TRI and cond1 ? fh[2] + adj : na, char = "△", color = color.new(color.white,15), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
//plotchar(plot_TRI and cond2 ? fl[2] - adj : na, char = "▽", color = color.new(color.white,15), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)



VERSION 3.0
Leaf:

Code: Select all

//@version=5
indicator("Leaf", overlay =  true)
mult = input(5.0, "fromClose", inline = "1")
tick = input(0.0001, "tickSize", inline = "1") * mult
clr_Up = input(color.blue, title = "UP", inline = "2")
clr_Dn = input(color.red, title = "DN", inline = "2")
clr_BG = input(color.white, title = "BG", inline = "2")

trendLine = (close[4] + close[3]) / 2

h = high
l = low
c = close + tick
o = close - tick
palette = trendLine < close ? clr_Up : clr_Dn
palette2 = trendLine < close ? clr_Dn : clr_Up
plotcandle(o,h,l,c, color = color.new(palette,45), bordercolor = color.new(palette, 20), wickcolor = color.new(palette,20), display = display.all - display.price_scale)
plot(close, color = color.new(clr_BG,50),style = plot.style_circles,join = true, linewidth = 3, display = display.all - display.status_line)
plot(close,color = color.new(palette,80), linewidth = 6, display = display.all - display.status_line - display.price_scale)

fh = h > c ? h : c
fl = l < o ? l : o
cond1 = close[2] > close[3] and close[2] > close[4] and close[2] > close[5] and close[2] > close[6] and close[2] >= close[1] and close[2] >= close[0] // is highest of 5, is >= 2 to the right.
cond2 = close[2] < close[3] and close[2] < close[4] and close[2] < close[5] and close[2] < close[6] and close[2] <= close[1] and close[2] <= close[0] // is lowest of 5, is <= 2 to the right.
plotchar(cond1 ? fh[2] + (tick * 0.786) : na, char = "⬜", color = color.new(clr_BG,85), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar(cond2 ? fl[2] - (tick * 0.786) : na, char = "⬜", color = color.new(clr_BG,85), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar(cond1 ? fh[2] + (tick * 0.786) : na, char = "△", color = color.new(clr_BG,10), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar(cond2 ? fl[2] - (tick * 0.786) : na, char = "▽", color = color.new(clr_BG,10), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)


VERSION 1.2
The Godfather:

Code: Select all

//@version=5
indicator("The Godfather", "ABBA", overlay=true)
useColorUp = input(color.rgb(28, 139, 230),    title = "UP")
useColorDn = input(color.rgb(224, 67, 67),     title = "DN")
useColorIk = input(color.new(color.black,15),    title = "WI")
useColorDr = input(color.new(color.black,15),    title = "BO")
useMA = input(88,  title = "MA")
//-----OLHCRange-----//
h = high
l = low
c = close
o = c[1]
r = (ta.highest(h,3) + ta.lowest(l,3) ) / 2
//----AM-BETTER-MA-----//
ma0 = (ta.sma(hlc3,3) + ta.sma(hlc3,4)[3] + (ta.sma(open, 16) + ta.sma(open, 19)[3]) ) / 4
sig = ta.lowest(ma0, 2) < ma0 ? color.rgb(28, 139, 230,0) : ta.highest(ma0,2) > ma0 ? color.new(color.red,0) : color.new(color.black,0)
//-----RSI-----//
rsiLine = ta.rsi(c, 7)
//-----SHOW-RSI-FLIPS-----//
upCon1 = rsiLine[1] <= 50 and rsiLine > 50
dnCon1 = rsiLine[1] > 50 and rsiLine <= 50
sigCon = upCon1 or dnCon1
upClr1 = color.new(color.blue,72)
dnClr1 = color.new(color.blue,72)
//-----CANDLE-COLOR-----//
sig2up = sigCon[2] and c[2] < c
sig3up = sigCon[3] and c[3] < c
sig2dn = sigCon[2] and c[2] > c
sig3dn = sigCon[3] and c[3] > c
signal = r < ma0 ? "dn" : r > ma0 ? "up" : "none"
signal := sig2up  or sig3up ? "up" : signal
signal := sig2dn  or sig3dn ? "dn" : signal
signal := not sig2up and not sig2dn and not sig3up and not sig3dn and sigCon[1] and ma0 < c ? "up" : signal
signal := not sig2up and not sig2dn and not sig3up and not sig3dn and sigCon[1] and ma0 > c ? "dn" : signal
///-----FINISHING-TOUCHES------///
plot(ma0, color = color.new(sig,useMA), style = plot.style_line, linewidth = 3,editable = false)
plotshape(upCon1, style = shape.triangleup, location = location.abovebar, color = upClr1,editable = false)
plotshape(dnCon1, style = shape.triangledown, location = location.belowbar, color = dnClr1,editable = false)
transpStamp = c[1] > c ? 0 : 50
palette = signal == "up" ? color.new(useColorUp,transpStamp) : signal == "dn" ? color.new(useColorDn,transpStamp) : signal == "none" ? color.new(color.yellow,transpStamp) : color.new(color.fuchsia,transpStamp)
plotcandle(o,h,l,c, color = color.new(palette, transpStamp), wickcolor = useColorIk , bordercolor = useColorDr, editable = false)


VERSION 2.0
aliasscript:

Code: Select all

//@version=5
indicator(title = "$ZILLIONZ", shorttitle = "aliasscript", overlay = true)
//-----Chart-Setup-----//
h = high
l = low
c = close
o = c[1]
updnCon = h[1] < c ? "up" : l[1] > c ? "dn" : "no"
updnCon := updnCon == "no" and o < c ? "white" : updnCon == "no" and o > c ? "black" : updnCon
palette = updnCon == "up" ? color.blue : updnCon == "dn" ? color.red : updnCon == "white" ? color.white :  updnCon == "black" ? color.black  : color.fuchsia
plotcandle(o,h,l,c, color = palette, wickcolor =color.rgb(107, 113, 133), bordercolor = color.rgb(66, 68, 77))
//-----Better-MA-----//
ma1 = (ta.sma(hlc3, 16) + ta.sma(hlc3, 19)[3]) / 2
sig = ta.lowest(ma1, 2) < ma1 ? color.new(color.blue,0) : ta.highest(ma1,2) > ma1 ? color.new(color.red,0) : color.new(color.black,0)
plot(ma1, color = color.new(sig,76), style = plot.style_line, linewidth = 3)
//-----UNO-REVERSE-----//
aliasUpCon = (ta.highest(high, 3) + ta.lowest(low,3) + ta.highest(close,3) + ta.lowest(close,3) ) / 4 > ma1
aliasDnCon = (ta.lowest(low,3) + ta.highest(high,3) + ta.highest(close,3) + ta.lowest(close,3)) / 4 < ma1
upColor = color.new(color.blue, 40)
dnColor = color.new(color.red, 40)
plotchar(aliasUpCon, char= "░", location = location.bottom,color = upColor)
plotchar(aliasDnCon, char= "░", location = location.bottom,color = dnColor)


VERSION 3.0
aliascript: (with "pointy places")

Code: Select all

//@version=5
indicator(title = "$ZILLIONZ", shorttitle = "aliascript", overlay = true)
//-----Chart-Setup-----//
adj = input(0.0, "moveTriangles", inline = "1")
doPlot = input(false, title = "triangles?", inline = "1")
doPlot2 = input(true, title = "20_MA?", inline = "2")
doPlot3 = input(false, title = "03_SRMA?", inline = "2")
trend = ta.sma(ta.rma(hlc3,3),3)
h = high
l = low
c = close
o = c[1]
updnCon = h[1] < c ? "up" : l[1] > c ? "dn" : "no"
updnCon := updnCon == "no" and o < c ? "white" : updnCon == "no" and o > c ? "black" : updnCon
palette = updnCon == "up" ? color.blue : updnCon == "dn" ? color.red : updnCon == "white" ? color.white :  updnCon == "black" ? color.black  : color.fuchsia
plotcandle(o,h,l,c, color = palette, wickcolor =color.rgb(107, 113, 133), bordercolor = color.rgb(66, 68, 77))
//-----Better-MA-----//
ma1 = (ta.sma(hlc3, 16) + ta.sma(hlc3, 19)[3]) / 2
sig = ta.lowest(ma1, 2) < ma1 ? color.new(color.blue,0) : ta.highest(ma1,2) > ma1 ? color.new(color.red,0) : color.new(color.black,0)
plot(doPlot2 ? ma1 : na, color = color.new(sig,76), style = plot.style_line, linewidth = 3)

fh = h
fl = l
cond1 = close[2] > close[3] and close[2] > close[4] and close[2] > close[5] and close[2] > close[6] and close[2] >= close[1] and close[2] >= close[0] // is highest of 5, is >= 2 to the right.
cond2 = close[2] < close[3] and close[2] < close[4] and close[2] < close[5] and close[2] < close[6] and close[2] <= close[1] and close[2] <= close[0] // is lowest of 5, is <= 2 to the right.
plotchar( doPlot and cond1 ? fh[2] + adj : na, char = "⬜", color = color.new(color.white,85), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar( doPlot and cond2 ? fl[2] - adj : na, char = "⬜", color = color.new(color.white,85), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar( doPlot and cond1 ? fh[2] + adj : na, char = "△", color = color.new(color.white,10), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)
plotchar( doPlot and cond2 ? fl[2] - adj : na, char = "▽", color = color.new(color.white,10), offset = -2, location = location.absolute, editable = false, display = display.all - display.status_line)

plot(doPlot3 ? trend : na, color = color.new(color.orange,70), style= plot.style_circles, join=true)
Last edited by IgazI on Mon Dec 26, 2022 9:17 pm, edited 113 times in total.
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Mon Oct 10, 2022 2:28 pm

Fixed a dumb mistake in the code. . .
was wondering why the MACD was not working #-o
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Mon Oct 10, 2022 4:27 pm

Version 2.0

Cleaned up the code, hopefully I'm done. . .


^RSI_S_R.jpg
^RSI_S_R.jpg (88.83 KiB) Viewed 2724 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Mon Oct 10, 2022 5:17 pm

^Screenshot.jpg
^Screenshot.jpg (133.69 KiB) Viewed 2715 times
^Screenshots.jpg
^Screenshots.jpg (136.49 KiB) Viewed 2709 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Looks pretty planned to me. . .

Postby IgazI » Mon Oct 10, 2022 8:28 pm

"It was an accident" -PayPal

^Screenshot.jpg
^Screenshot.jpg (133.69 KiB) Viewed 2683 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Tue Oct 11, 2022 12:27 pm

Version 2.1 update

It seems that I wasn't done, there were still errors in the code (dealing with bar-flips) #-o

I'll comb through it one more time. . .hopefully it is completely fixed now.
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Tue Oct 11, 2022 1:03 pm

Wutcha doin? :lol:

PS: Remember:

this indicator is checking the confluence of the. . .
- Stochastics
- RSI
- MACD
- typical price vs a hair-splitting average
- and the important areas of S&R

Everything that you could possibly want to know is in the color of the bar.

The only thing that you have to do is form a plan around color.


^Screenshot_madness.jpg
^Screenshot_madness.jpg (91.73 KiB) Viewed 2603 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Tue Oct 11, 2022 6:05 pm

Charts tell you what has happened and what is happening, it is not possible to predict the future!

Sure, you can make a good guess, but in the end, it was just a guess, and you were probably only right because that is what price was or is doing.


^dunno.jpg
^dunno.jpg (97.26 KiB) Viewed 2557 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Tue Oct 11, 2022 7:57 pm

Look at that launch off of the RSI bar-flip :shock:

^Screenshot 2022-10-11.jpg
^Screenshot 2022-10-11.jpg (71.95 KiB) Viewed 2541 times
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

User avatar
IgazI
rank: 1000+ posts
rank: 1000+ posts
Posts: 1173
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 937
Gender: None specified

Re: PowerX Strategy "PowerZ"

Postby IgazI » Tue Oct 11, 2022 9:33 pm

It's kinda funny that I pull the PowerX strategy apart, examine all the pieces, put it all back together, and in the end all I can say is. . .yeah, its pretty damn good! :lol:

I'm still glad that I did, because I learned just how valuable the RSI is;
not every flip of the RSI mind you, only the ones that are nearest to color.

Because %D is smooth I've chosen the '13,3,3' setting over the '14,3,3', pretty minor change.

The signal that I chose is 49 instead of 50, not really that big of a deal.

'PowerY' only assists you with moving your stops closer to the current price as the strength of the trend starts breaking down:

Code: Select all

signal := signal == "buy" and smma > typicalPrice or signal == "sell" and smma < typicalPrice ? "none" : signal


'PowerZ', the black bar, is similar to the black bar exit of PowerX, as the RSI is the most likely indicator to flip first.

So, in the end I didn't come up with anything new, I just reorganized the information :lol:
50,490 ADA + 351,791.3571 JASMY
"Everything Should Be Made As Simple As Possible, But Not Simpler!"

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “general”