NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

//@version=5
indicator('STO533 AAA', overlay=true)
mult = input.float(defval=24)
len = input(defval=1440)

bool twos = input.bool(false, "Just 2+", inline = "01")
bool threes = input.bool(false, "Just 3+", inline = "01")
bool fours = input.bool(false, "Just 4+", inline = "01")
bool fives = input.bool(false, "Just 5+", inline = "01")
bool nines = input.bool(false, "Just 9+", inline = "01")

[superTrend, dir] = ta.supertrend(mult, len)
colResistance = dir == 1 and dir == dir[1] ? color.new(color.red, 0) : color.new(color.red, 100)
colSupport = dir == -1 and dir == dir[1] ? color.new(color.green, 0) : color.new(color.green, 100)
//l1 = plot(superTrend, color=colResistance, linewidth=2)
//l2 = plot(superTrend, color=colSupport, linewidth=2)
//price = plot((close + open) / 2, transp=100)


buy = dir[1] == 1 ? dir == -1 ? 1 : na : na
sell = dir[1] == -1 ? dir == 1 ? 1 : na : na

// Test Call Forex Martingale
//calt = strategy.grossprofit-strategy.grossloss
//mar = calt < 0 ? 0.01+((calt*-33)/close) : 0.01
//strategy.entry("Call",true,mar,when = buy == 1 )
//closeoder = close >= strategy.position_avg_price*1.03 ? 1 : close <= strategy.position_avg_price*0.99 ? 1 : na
///strategy.close("Call",when = close == close)
//strategy.close("Call",when = closeoder == 1)
// End Test Call Martingale


// Test Put Forex Martingale
//calts = strategy.grossprofit-strategy.grossloss
//mars = calts < 0 ? 0.01+((calts*-33)/close) : 0.01
//strategy.entry("Put",true,mars,when = sell == 1 )
//closeoders = close >= strategy.position_avg_price*1.01 ? 1 : close <= strategy.position_avg_price*0.97 ? 1 : na
///strategy.close("Call",when = close == close)
//strategy.close("Put",when = closeoders == 1)
// End Put Martingale




// Plot Buy & Sell
//plotshape(buy, title='Buy', text='Buy', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), size=size.tiny)
//plotshape(sell, title='Sell', text='Sell', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), size=size.tiny)
// Plot Buy & Sell End

// barcolor
//bcolors = d < 20 ? color.white : d > 80 ? color.black : d > 75 ? d < 80 ? color.gray : na : d > 20 ? d < 25 ? color.yellow : na : na
bcolor = dir == 1 and dir == dir[1] ? color.red : color.green
//barcolor(color=bcolor)
// barcolor End

//fill(l1, price, bcolor, transp=90)



//STO533
pbar = input(1, title='period Bar')
periodK = input(5, title='%K Length')
smoothK = input(3, title='%K Smoothing')
periodD = input(3, title='%D Smoothing')
lengthsma = input(60, title='Length')
k = ta.sma(ta.stoch(close, high, low, periodK), smoothK)
d = ta.sma(k, periodD)
ssma = ta.sma(close, lengthsma)

emaone = ta.ema(close, 50)
ematow = ta.ema(close, 200)

plot(emaone, color=color.new(#FFFFFF, 0))
plot(ematow, color=color.new(#FF9900, 0))

//plot((ematow+emaone)/2, color=color.new(#FFFFFF, 0))

//STO533 End

/// y = mx + c
//// m is y2-y1 / x2 - x1
/// ref = https://www.desmos.com/calculator/9gqbfwlujj?lang=th

s1 = k[1]
e1 = k

s2 = d[1]
e2 = d

check = s2 > 80 ? 1 : s2 < 20 ? 2 : na
//Substitute
se1down = -1
se2down = -1
se1up = s1 - e1
se2up = s2 - e2

se1right = s1
se2right = s2

//calculate for X
crossup = se1up - se2up
crossright = se1right - se2right

//IF OVB = -1 & OVS = 1

//Swich together X
crossupswich = crossup * -1
//Swich swcich come back to calculate X
vx = crossright / crossupswich * -1

//Get X next Get Y
vy = se1up * vx / se1down + se1right
// VY = X Value
value = vy

//plot(vy)

//Plot to Graph
crossovs = ta.crossover(k, d)
crossovb = ta.crossunder(k, d)

buys = crossovs[pbar] ? na : crossovs and vy <= 20 ? 1 : na
sells = crossovb[pbar] ? na : crossovb and vy >= 80 ? 1 : na

gobuy = buys == 1 ? 1 : 0
gosell = sells == 1 ? 1 : 0




bbcolor = d < 20 ? color.white : d > 80 ? color.black : d > 75 ? d < 80 ? color.gray : na : d > 20 ? d < 25 ? color.yellow : na : na
barcolor(color=bbcolor)


// Test Call Forex Martingale
//caltx = strategy.grossprofit-strategy.grossloss
//marx = caltx < 0 ? 0.01+((caltx*-33)/close) : 0.01
//strategy.entry("goCall",true,marx,when = gobuy == 1 )
//closeoderx = close >= strategy.position_avg_price*1.03 ? 1 : close <= strategy.position_avg_price*0.99 ? 1 : na
///strategy.close("Call",when = close == close)
//strategy.close("goCall",when = closeoderx == 1)
// End Test Call Martingale


// Test Put Forex Martingale
//caltsx = strategy.grossprofit-strategy.grossloss
//marsx = caltsx < 0 ? 0.01+((caltsx*-33)/close) : 0.01
//strategy.entry("goPut",true,marsx,when = gosell == 1 )
//closeodersx = close >= strategy.position_avg_price*1.01 ? 1 : close <= strategy.position_avg_price*0.97 ? 1 : na
///strategy.close("Call",when = close == close)
//strategy.close("goPut",when = closeodersx == 1)
// End Put Martingale

checkcross = crossovs and vy <= 20 ? 1 : crossovb and vy >= 80 ? 2 : na



checkbar = checkcross[1] == 1 ? close < open ? 1 : 3 : checkcross[1] == 2 ? close > open ? 1 : 3 : na

numloses = checkbar == 1 ? 1 : checkbar == 3 ? 3 : 0

keb = 0
keb := numloses

kot = 0
kot := keb == 0 ? kot[1] == 1 ? kot[1] : keb[1] : keb == 1 ? keb : na

kot := numloses == 3 ? 0 : keb == 0 ? kot[1] >= 0 ? kot[1] : keb[1] : keb == 1 ? kot[1] + keb : na
//kot := kot >= 0 ? keb == 1 ? kot + keb :keb == 0 ? keb[1] == 1 ? kot[1] + keb[1] :kot[1] : na : na

//call cal
kotcall = 0
kebcall = 0
checkcrosscall = crossovs[pbar] ? na : crossovs and vy <= 20 ? 1 : na
checkbarcall = checkcrosscall[pbar] == 1 ? close < close[1] ? 1 : close == close[1] ? na : 3 : na
numlosescall = checkbarcall == 1 ? 1 : checkbarcall == 3 ? 3 : 0

kebcall := numlosescall
kotcall := numlosescall == 3 ? 0 : kebcall == 0 ? kotcall[1] >= 0 ? kotcall[1] : kebcall[1] : kebcall == 1 ? kotcall[1] + kebcall : na



xycall = kotcall+1
wincall = 0
wincall := 100 * (xycall / (xycall + 1))

//call cal end


//put cal
kotput = 0
kebput = 0
checkcrossput = crossovb[pbar] ? na : crossovb and vy >= 80 ? 1 : na
checkbarput = checkcrossput[pbar] == 1 ? close > close[1] ? 1 : close == close[1] ? na : 3 : na
numlosesput = checkbarput == 1 ? 1 : checkbarput == 3 ? 3 : 0

kebput := numlosesput
kotput := numlosesput == 3 ? 0 : kebput == 0 ? kotput[1] >= 0 ? kotput[1] : kebput[1] : kebput == 1 ? kotput[1] + kebput : na



xyput = kotput+1
winput = 0
winput := 100 * (xyput / (xyput + 1))

//put cal end


//
//plot(kot,color=color.yellow)
//plot(keb,color=color.white)

xy = kot+1
win = 0
win := 100 * (xy / (xy + 1))


perbar = checkcross == 1 ? win > 89 ? 1 : win > 79 ? 2 : win > 74 ? 3 : win > 65 ? 4 : 5 : win > 89 ? 1 : win > 79 ? 2 : win > 74 ? 3 : win > 65 ? 4 : 5
//barcolor(color=bbcolor)

buya = gobuy == 1 ? kotcall == 0 ? nines ? na : fives ? na : fours ? na : threes ? na : twos ? na : 1 : na : na
buyb = gobuy == 1 ? kotcall == 1 ? nines ? na : fives ? na : fours ? na : threes ? na : twos ? na : 1 :na : na
buyc = gobuy == 1 ? kotcall == 2 ? nines ? na : fives ? na : fours ? na : threes ? na : 1 :na : na
buyd = gobuy == 1 ? kotcall == 3 ? nines ? na : fives ? na : fours ? na : 1 :na : na
buye = gobuy == 1 ? kotcall == 4 ? nines ? na : fives ? na : 1 : na : na
buyf = gobuy == 1 ? kotcall == 5 ? nines ? na : 1 :na : na
buyg = gobuy == 1 ? kotcall == 6 ? nines ? na : 1 :na : na
buyh = gobuy == 1 ? kotcall == 7 ? nines ? na : 1 : na : na
buyi = gobuy == 1 ? kotcall == 8 ? nines ? na : 1 :na : na
buyj = gobuy == 1 ? kotcall == 9 ? 1 :na : na
buyk = gobuy == 1 ? kotcall > 9 ? 1 :na : na

plotshape(buya, title='Call0', text='0', textcolor=color.new(color.black, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.rgb(255, 255, 255) , 0), size=size.small)
plotshape(buyb, title='Call1', text='1', textcolor=color.new(color.black, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.rgb(255, 255, 255) , 0) , size=size.small)
plotshape(buyc, title='Call2', text='2', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#1E90FF , 0) , size=size.small)
plotshape(buyd, title='Call3', text='3', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buye, title='Call4', text='4', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buyf, title='Call5', text='5', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buyg, title='Call6', text='6', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buyh, title='Call7', text='7', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buyi, title='Call8', text='8', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(#363636 , 0), size=size.small)
plotshape(buyj, title='Call9', text='9', textcolor=color.new(color.black, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.rgb(250,177,160) , 0), size=size.small)
plotshape(buyk, title='Call9+', text='9+', textcolor=color.new(color.black, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.rgb(250,177,160) , 0), size=size.small)

plotshape(gobuy, title='Call', text='Call', textcolor=color.new(color.white, 0), style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), size=size.tiny)

///////////////////////put

sella = gosell == 1 ? kotput == 0 ? nines ? na : fives ? na : fours ? na : threes ? na : twos ? na : 1 : na : na
sellb = gosell == 1 ? kotput == 1 ? nines ? na : fives ? na : fours ? na : threes ? na : twos ? na : 1 : na : na
sellc = gosell == 1 ? kotput == 2 ? nines ? na : fives ? na : fours ? na : threes ? na : 1 : na : na
selld = gosell == 1 ? kotput == 3 ? nines ? na : fives ? na : fours ? na : 1 : na : na
selle = gosell == 1 ? kotput == 4 ? nines ? na : fives ? na : 1 : na : na
sellf = gosell == 1 ? kotput == 5 ? nines ? na : 1 : na : na
sellg = gosell == 1 ? kotput == 6 ? nines ? na : 1 : na : na
sellh = gosell == 1 ? kotput == 7 ? nines ? na : 1 : na : na
selli = gosell == 1 ? kotput == 8 ? nines ? na : 1 : na : na
sellj = gosell == 1 ? kotput == 9 ? 1 : na : na
sellk = gosell == 1 ? kotput > 9 ? 1 : na : na

plotshape(sella, title='Put0', text='0', textcolor=color.new(color.black, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.rgb(255, 255, 255) , 0), size=size.small)
plotshape(sellb, title='Put1', text='1', textcolor=color.new(color.black, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.rgb(255, 255, 255) , 0), size=size.small)
plotshape(sellc, title='Put2', text='2', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#FF9900 , 0), size=size.small)
plotshape(selld, title='Put3', text='3', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(selle, title='Put4', text='4', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(sellf, title='Put5', text='5', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(sellg, title='Put6', text='6', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(sellh, title='Put7', text='7', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(selli, title='Put8', text='8', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(#363636 , 0), size=size.small)
plotshape(sellj, title='Put9', text='9', textcolor=color.new(color.black, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.rgb(250,177,160) , 0), size=size.small)
plotshape(sellk, title='Put9+', text='9+', textcolor=color.new(color.black, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.rgb(250,177,160) , 0), size=size.small)

plotshape(gosell, title='Put', text='Put', textcolor=color.new(color.white, 0), style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), size=size.tiny)



winalert = buyd[1] == 1 ? close > open ? 1 : na : buye[1] == 1 ? close > open ? 1 : na : selld[1] == 1 ? close < open ? 1 : na : selle[1] == 1 ? close < open ? 1 : na : na
losealert = buyd[1] == 1 ? close < open ? 1 : na : buye[1] == 1 ? close < open ? 1 : na : selld[1] == 1 ? close > open ? 1 : na : selle[1] == 1 ? close > open ? 1 : na : na
drawalert = buyd[1] == 1 ? close == open ? 1 : na : buye[1] == 1 ? close == open ? 1 : na : selld[1] == 1 ? close == open ? 1 : na : selle[1] == 1 ? close == open ? 1 : na : na

alertcondition(winalert, title='xAlert1 Win', message='{ "embeds": [ { "title": "{{ticker}} : WINNNN 😍🥳", "color": 8697948 } ]}')
alertcondition(losealert, title='xAlert2 Lose', message='{ "embeds": [ { "title": "{{ticker}} : LOSE 😱😭", "color": 12083804 } ]}')
alertcondition(drawalert, title='xAlert3 Draw', message='{ "embeds": [ { "title": "{{ticker}} : DRAW 😵😯", "color": 16777215 } ]}')

alertcondition(buyd, title='Call Signal 80%+', message='{ "embeds": [ { "title": "{{ticker}} (Call ⏫) : No later than 5 minutes can call", "color": 8697948 } ]}')
alertcondition(buye, title='Call Signal 90%+', message='{ "embeds": [ { "title": "{{ticker}} (Call ⏫) : No later than 5 minutes can call", "color": 8697948 } ]}')

alertcondition(selld, title='Put Signal 80%+', message='{ "embeds": [ { "title": "{{ticker}} (Put ⏬) : No later than 5 minutes can put", "color": 12083804 } ]}')
alertcondition(selle, title='Put Signal 90%+', message='{ "embeds": [ { "title": "{{ticker}} (Put ⏬) : No later than 5 minutes can put", "color": 12083804 } ]}')
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.