All things TradingView

everything that doesn't belong elsewhere cometh here

Moderator: moderators

User avatar
IgazI
rank: 50+ posts
rank: 50+ posts
Posts: 121
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 147
Gender: None specified

Re: All things TradingView

Postby IgazI » Wed Jun 06, 2018 4:18 pm

Tried to make a HOLO indicator...I'm not all too pleased with it :lol:

I need to fill a few gaps in my knowledge of the language.

HOLO.png
HOLO.png (24.5 KiB) Viewed 297 times
save.png
save.png (27.16 KiB) Viewed 297 times


Code: Select all

//@version=3
study("HOLO", overlay=true)
HOLO = security(tickerid, "60", open)
HIGH = security(tickerid, "D", high)
LOW = security(tickerid, "D", low)
OPEN = security(tickerid, "D", open)
CLOSE = security(tickerid, "D", close)

dwn = CLOSE < OPEN

highestOpen = highest(HOLO, 24)
lowestOpen = lowest(HOLO, 24)

plot1 = plot(highestOpen, show_last=1,style=stepline, trackprice = true, color=color(black,80))
plot2 = plot(lowestOpen, show_last=1, style=stepline, trackprice = true,color=color(black,80))

fill(plot1, plot2, color(silver, 60))


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

User avatar
LeMercenaire
rank: 1000+ posts
rank: 1000+ posts
Posts: 1041
Joined: Tue Sep 27, 2016 12:11 am
Reputation: 956
Gender: None specified

Re: All things TradingView

Postby LeMercenaire » Wed Jun 06, 2018 5:37 pm

IgazI wrote:Tried to make a HOLO indicator...I'm not all too pleased with it :lol:

I need to fill a few gaps in my knowledge of the language.

HOLO.pngsave.png

Code: Select all

//@version=3
study("HOLO", overlay=true)
HOLO = security(tickerid, "60", open)
HIGH = security(tickerid, "D", high)
LOW = security(tickerid, "D", low)
OPEN = security(tickerid, "D", open)
CLOSE = security(tickerid, "D", close)

dwn = CLOSE < OPEN

highestOpen = highest(HOLO, 24)
lowestOpen = lowest(HOLO, 24)

plot1 = plot(highestOpen, show_last=1,style=stepline, trackprice = true, color=color(black,80))
plot2 = plot(lowestOpen, show_last=1, style=stepline, trackprice = true,color=color(black,80))

fill(plot1, plot2, color(silver, 60))




Still looks better than anything I could ever dream of producing, lol.

You know what they say - the enjoyment is in the journey, not just the destination.

salezyakuku
rank: 150+ posts
rank: 150+ posts
Posts: 163
Joined: Thu Mar 19, 2015 9:45 pm
Reputation: 76
Location: PL
Gender: Male

Re: All things TradingView

Postby salezyakuku » Wed Jun 06, 2018 8:31 pm

I wrote this long ago (version=2 Pine Script), still works.

CZ.png
CZ.png (61.79 KiB) Viewed 284 times


Code: Select all

//@version=2
study(title="Crash Zone", overlay = true)
width = input(2, minval=1)
a = security(tickerid, "W", high[1]) - security(tickerid, "W", low[1])
b = security(tickerid, "W", high[2]) - security(tickerid, "W", low[2])
c = security(tickerid, "W", high[3]) - security(tickerid, "W", low[3])
wpl = security(tickerid, "W", low)
wph = security(tickerid, "W", high)
mid = (wpl+wph)/2
tmp=0
if (b>c)
    tmp := b
    b := c
    c := tmp
else
    b := c
    c := c

if (a>c)
    tmp := a
    a := c
    c := tmp
else
    a := a
    c := c

if (a>b)
    tmp := a
    a := b
    b := tmp
else
    b := b
    a := a

lt1 = wpl + b * 0.625
lt2 = wpl + b * 0.875
lt3 = wpl + b
lt4 = wpl + b * 1.125
lt5 = wpl + b * 1.375
st1 = wph - b * 0.625
st2 = wph - b * 0.875
st3 = wph - b 
st4 = wph - b * 1.125
st5 = wph - b * 1.375 
   
plot(st1, color=#4fc8cf, title="S", linewidth = width)
plot(st2, color=#4fc8cf, title="S", linewidth = width)
plot(st3, color=#4fc8cf, title="S", linewidth = width)
plot(st4, color=#4fc8cf, title="S", linewidth = width)
plot(st5, color=#4fc8cf, title="S", linewidth = width)

plot(mid, color=black, title="S", linewidth = width)

plot(lt1, color=#9e2ea8, title="R", linewidth = width)
plot(lt2, color=#9e2ea8, title="R", linewidth = width)
plot(lt3, color=#9e2ea8, title="R", linewidth = width)
plot(lt4, color=#9e2ea8, title="R", linewidth = width)
plot(lt5, color=#9e2ea8, title="R", linewidth = width)

fill(plot1=plot(lt4, color=#9e2ea8, title="R", linewidth = width),
     plot2=plot(lt5, color=#9e2ea8, title="R", linewidth = width),
     color=#fa0546, transp=80)
fill(plot1=plot(lt1, color=#9e2ea8, title="R", linewidth = width),
     plot2=plot(lt2, color=#9e2ea8, title="R", linewidth = width),
     color=#fa0546, transp=80)
fill(plot1=plot(st4, color=#4fc8cf, title="S", linewidth = width),
     plot2=plot(st5, color=#4fc8cf, title="S", linewidth = width),
     color=#5c2197, transp=80)
fill(plot1=plot(st1, color=#4fc8cf, title="S", linewidth = width),
     plot2=plot(st2, color=#4fc8cf, title="S", linewidth = width),
     color=#5c2197, transp=80)
"I only see my goals, I don't believe in failure 'Cause I know the smallest voices, they can make it major"

User avatar
IgazI
rank: 50+ posts
rank: 50+ posts
Posts: 121
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 147
Gender: None specified

Re: All things TradingView

Postby IgazI » Fri Jun 08, 2018 12:59 pm

salezyakuku wrote:I wrote this long ago (version=2 Pine Script), still works.


Thank you salezyakuku! :D

User avatar
IgazI
rank: 50+ posts
rank: 50+ posts
Posts: 121
Joined: Sat Feb 17, 2018 5:28 pm
Reputation: 147
Gender: None specified

Re: All things TradingView

Postby IgazI » Fri Jun 08, 2018 1:15 pm

LeMercenaire wrote:
Still looks better than anything I could ever dream of producing, lol.

You know what they say - the enjoyment is in the journey, not just the destination.


Indicators are nice, but what I really want is to write simple strategies for entries and exits:
the only thing that a human should have to do is select a horizontal line.

WZ.png
WZ.png (7.46 KiB) Viewed 229 times

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

User avatar
LeMercenaire
rank: 1000+ posts
rank: 1000+ posts
Posts: 1041
Joined: Tue Sep 27, 2016 12:11 am
Reputation: 956
Gender: None specified

Re: All things TradingView

Postby LeMercenaire » Fri Jun 08, 2018 1:22 pm

IgazI wrote:
LeMercenaire wrote:
Still looks better than anything I could ever dream of producing, lol.

You know what they say - the enjoyment is in the journey, not just the destination.


Indicators are nice, but what I really want is to write simple strategies for entries and exits:
the only thing that a human should have to do is select a horizontal line.

WZ.png


And now you're speaking the language I understand!

salezyakuku
rank: 150+ posts
rank: 150+ posts
Posts: 163
Joined: Thu Mar 19, 2015 9:45 pm
Reputation: 76
Location: PL
Gender: Male

Re: All things TradingView

Postby salezyakuku » Fri Jun 08, 2018 3:26 pm

IgazI wrote:
salezyakuku wrote:I wrote this long ago (version=2 Pine Script), still works.


Thank you salezyakuku! :D

There is bug in "Sorting Network".

Code: Select all

if (b>c)
    tmp := b
    b := c
    c := tmp
else
    b := c  //bug
    c := c

should be:

Code: Select all

if (b>c)
    tmp := b
    b := c
    c := tmp
else
    b := b //correct
    c := c
"I only see my goals, I don't believe in failure 'Cause I know the smallest voices, they can make it major"

salezyakuku
rank: 150+ posts
rank: 150+ posts
Posts: 163
Joined: Thu Mar 19, 2015 9:45 pm
Reputation: 76
Location: PL
Gender: Male

Re: All things TradingView

Postby salezyakuku » Fri Jun 08, 2018 3:49 pm

I also have unfinished Eights indi (missing position size) but it needs to be updated to sweetspot formula. I will look at v3 first (v2 had some limitation).

eights.png
eights.png (61.95 KiB) Viewed 214 times
"I only see my goals, I don't believe in failure 'Cause I know the smallest voices, they can make it major"

User avatar
Leoheart
rank: 150+ posts
rank: 150+ posts
Posts: 203
Joined: Thu Feb 23, 2017 10:54 pm
Reputation: 262
Gender: None specified

Re: All things TradingView

Postby Leoheart » Thu Jun 14, 2018 10:44 am

IgazI or anyone else that uses trading view: I am playing around with their charts, any reason why Renko/3line break/P&F are not being displayed below Daily/Week/Monthly? Probably missing something very obvious. Thanks in advance.
"For every possessor of knowledge, there is one more knowing"
“The quieter you become, the more you can hear.”

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


Return to “general”