NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MarkNarathip

//@version=5
///
indicator(title="MKN SETUP 2023 CBC OLD", overlay=true)


/// EMA

in1 = 50
in2 = 200
in3 = 5

TP = 0.1
RR = 1
bartrade = input.float(4, minval=0.00001, title="Bar trade")
//Trade = input.float(10.00, minval=0.01, title="Size Trade : ")
//spread = input.float(1.2, minval=0.00001, title="Spread")
//unit = input.float(100000, minval=0.00001, title="Unit")

//bool swich = input.bool(true, "TP&SL Display", inline = "01")
//bool flagcheck = input.bool(true, "Flag Display", inline = "01")
//bool winlosecheck = input.bool(true, "Win Lose Display", inline = "01")
//bool eight = input.bool(false, "Percents", inline = "01")
//bool show = input.bool(false, "Show Line Fail Counts", inline = "01")
//bool draw = input.bool(true, "Draw", inline = "01")

//bool longP = input.bool(true, "Long P", inline = "01")
//bool shortP = input.bool(true, "Short P", inline = "01")
//bool hitthree = input.bool(true, "Hit three", inline = "01")

l1 = ta.ema(close, in1)
l2 = ta.ema(close, in2)
l3 = (((low[4]+low[3]+low[2]+low[1]+low)/5)+(((high[4]+high[3]+high[2]+high[1]+high)/5))+(((close[4]+close[3]+close[2]+close[1]+close)/5))+(((open[4]+open[3]+open[2]+open[1]+open)/5)))/4
l4 = ta.ema(close, 5)
l5 = ta.ema(close, 15)


/// EMA END


plot(l1, color=#ffffff)
plot(l2, color=#fc4902)
plot(l4, color=#00ffff)
plot(l5, color=#15ff00)
///STO533

pbar = 1
periodK = 5
smoothK = 3
periodD = 3
lengthsma = 60
k = ta.sma(ta.stoch(close, high, low, periodK), smoothK)
d = ta.sma(k, periodD)


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)

///STO533 END





longtp = (TP*(0.01*RR))+1
longsl = 1-(TP*0.01)

shortsl = (TP*0.01)+1
shorttp = 1-(TP*(0.01*RR))

/// Process


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

//gold = crossovs and vy <= 20 ? 1 : 0
//death = crossovb and vy >= 80 ? 1 : 0
//gold = crossovs and vy <= 20 ? l1 > l2 ? 1 : 0 : 0
//death = crossovb and vy >= 80 ? l1 < l2 ? 1 : 0 : 0

crossovsema = ta.crossover(l4, l5)
crossovbema = ta.crossunder(l4, l5)

gold = 0.00
death = 0.00
tradecall = 0.00
tradeput = 0.00

//gold := close > open ? l1 > l2 ? l4 > l5 ? l5 > l1 ? l4 > l4[1] ? gold[1] == 1 ? na : 1 : 0 : 0 : 0 : 0 : 0
//death := close < open ? l1 < l2 ? l4 < l5 ? l5 < l1 ? l4 < l4[1] ? death[1] == 1 ? na : 1 : 0 : 0 : 0 : 0 : 0

gold := close > open ? tradecall[1] > 0 ? na : tradeput[1] > 0 ? na :1 : 0
death := close < open ? tradeput[1] > 0 ? na : tradecall[1] > 0 ? na : 1 : 0

//gold = close < low[1] ? l1 > l2 ? l5 > l1 ? l4 > l5 ? 1 : 0 : 0 : 0 : close < low[1] and vy <= 20 ? l1 > l2 ? l4 > l5 ? l5 > l1 ? 1 : 0 : 0 : 0 : 0
//death = close > high[1] ? l1 < l2 ? l5 < l1 ? l4 < l5 ? 1 : 0 : 0 : 0 : close > high[1] and vy >= 80 ? l1 < l2 ? l4 < l5 ? l5 < l1 ? 1 : 0 : 0 : 0 : 0

//gold = close < open ? l1 > l2 ? l4 > l5 ? l5 > l1 ? 1 : 0 : 0 : 0 : 0
//death = close > open ? l1 < l2 ? l4 < l5 ? l5 < l1 ? 1 : 0 : 0 : 0 : 0



dataset = 0.00
datasetwins = 0.00
datasetloses = 0.00
odercount = 0.00

odercount := odercount[1] > 0 ? odercount[1] == (bartrade+1) ? na : close > 0 ? odercount[1]+1 : odercount[1] : gold == 1 ? 1 : death == 1 ? 1 : na

tradecall := tradecall[1] > 0 ? odercount[1] == (bartrade+1) ? na : tradecall[1] : gold == 1 ? close : na
tradecallb = tradecall*0.99995

tradecallline = plot(tradecall,color=color.new(#CCFF00, 100))
tradecalllineb = plot(tradecallb,color=color.new(#CCFF00, 100))

fill(tradecallline,tradecalllineb,#00ff4c)


tradeput := tradeput[1] > 0 ? odercount[1] == (bartrade+1) ? na : tradeput[1] : death == 1 ? close : na
tradeputb = tradeput*1.00005

tradeputline = plot(tradeput,color=color.new(#CCFF00, 100))
tradeputlineb = plot(tradeputb,color=color.new(#CCFF00, 100))

fill(tradeputline,tradeputlineb,#ff0000)


win = tradecall[1] > 0 ? tradecall > 0 ? na : close[1] > close[2] ? 1 : na : tradeput[1] > 0 ? tradeput > 0 ? na : close[1] < close[2] ? 1 : na : na
lose = tradecall[1] > 0 ? tradecall > 0 ? na : close[1] < close[2] ? 1 : na : tradeput[1] > 0 ? tradeput > 0 ? na : close[1] > close[2] ? 1 : na : na








numlose = 0.00
numlose := numlose[1] > 0 ? lose == 1 ? numlose[1]+1 : win == 1 ? 0 : numlose[1] : lose == 1 ? 1 : 0

avgnum = 0.00
avgnum := avgnum[1] > 0 ? numlose == numlose[1] ? avgnum[1] : avgnum[1]+numlose : numlose > 0 ? numlose : 0

avgnums = 0.00
avgnums := avgnums[1] > 0 ? lose == 1 ? avgnums[1]+1 : avgnums[1] : numlose > 0 ? 1 : 0

maxset = 0.00
maxsetall = 0.00
set = 0.00

set := set[1] > 0 ? set[1] <= 2 ? win == 1 ? set[1]+1 : lose == 1 ? 0 : set[1] : 0 : win == 1 ? 1 : 0
maxset := maxset[1] > 0 ? set[1] <= 2 ? lose == 1 ? maxset[1]+1 : lose == 1 ? maxset[1]+1 : maxset[1] : 0 : set[1] <= 2 ? lose == 1 ? 1 : 0 : 0
maxsetall := maxsetall[1] > 0 ? maxset > maxsetall[1] ? maxset : maxsetall[1] : maxset > 0 ? maxset : 0

/////////////

//wins = tradecall[1] > 0 ? tradecall > 0 ? na : close[1] > tradecall[1] ? 1 : na : na
//loses = tradecall[1] > 0 ? tradecall > 0 ? na : close[1] < tradecall[1] ? 1 : na : na


cc = 0.00
cc := cc[1] > 0 ? win == 1 ? cc[1]+1 : lose == 1 ? cc[1]+1 : cc[1] : win == 1 ? 1 : lose == 1 ? 1 : 0

wins = win == 1 ? 1 : na
loses = lose == 1 ? 1 : na

stack = 0.00
stack := stack[1] > 0 ? lose == 1 ? stack[1]+1 : win == 1 ? 0 : stack[1] : lose == 1 ? 1 : 0

topstack = 0.00
topstack := topstack[1] > 0 ? stack > topstack[1] ? stack : topstack[1] : stack > 0 ? 1 : 0

//wins = close > open ? 1 : na
//loses = close < open ? 1 : na


var a = array.new_float(100)
sizes = array.size(a)

if wins == 1
if sizes == 100
array.remove(a, 0)
array.push(a, 1)
else
array.push(a, 1)
else if loses == 1
if sizes == 100
array.remove(a, 0)
array.push(a, 0)
else
array.push(a, 0)
else
0

red = 0.00
green = 0.00

red := red[1] > 0 ? close < open ? red[1]+1 : red[1] : close < open ? 1 : 0
green := green[1] > 0 ? close > open ? green[1]+1 : green[1] : close > open ? 1 : 0

max = 0.00
maxs = 0.00
pwin = array.sum(a)
plose = sizes - array.sum(a)
pall = bar_index > 100 ? 50 - pwin : 0
palls = bar_index > 100 ? plose - 50 : 0


allwinrate = 0.00
allwinrate := allwinrate[1] > 0 ? wins == 1 ? allwinrate[1]+1 : allwinrate[1] : wins == 1 ? 1 : 0

allloserate = 0.00
allloserate := allloserate[1] > 0 ? loses == 1 ? allloserate[1]+1 : allloserate[1] : loses == 1 ? 1 : 0

winrate = allwinrate/(allwinrate+allloserate)

plot(pwin, color=color.new(#f3ff52, 0))
//plot(plose, color=color.new(#ff3e3e, 0))
//plot(pall, color=color.new(#fdfffd, 0))



wnl1 = array.get(a,0) == 1 ? '🔥' : '🧊'
wnl2 = array.get(a,1) == 1 ? '🔥' : '🧊'
wnl3 = array.get(a,2) == 1 ? '🔥' : '🧊'
wnl4 = array.get(a,3) == 1 ? '🔥' : '🧊'
wnl5 = array.get(a,4) == 1 ? '🔥' : '🧊'
wnl6 = array.get(a,5) == 1 ? '🔥' : '🧊'
wnl7 = array.get(a,6) == 1 ? '🔥' : '🧊'
wnl8 = array.get(a,7) == 1 ? '🔥' : '🧊'
wnl9 = array.get(a,8) == 1 ? '🔥' : '🧊'
wnl10 = array.get(a,9) == 1 ? '🔥' : '🧊'
sumwnl = array.get(a,0)+array.get(a,1)+array.get(a,2)+array.get(a,3)+array.get(a,4)+array.get(a,5)+array.get(a,6)+array.get(a,7)+array.get(a,8)+array.get(a,9)

cow = (((stack+1)/((stack+1)+1))*100)+((50-array.sum(a))/100)
tradesim = pwin < 40 ? sumwnl > 0 ? cow > 0 ? 1 : na : na : na

sumtrade = 0.00
sumtrade := sumtrade[1] > 0 ? lose == 1 ? sumtrade[1]+1 : win == 1 ? 0 : sumtrade[1] : tradesim == 1 ? 1 : 0

maxsumtrade = 0.00
maxsumtrade := maxsumtrade[1] > 0 ? sumtrade > maxsumtrade[1] ? sumtrade : maxsumtrade[1] : sumtrade> 0 ? sumtrade : 0

//plot(sumtrade)
//plot(maxsumtrade, color=color.new(color.green, 0))
//plot(sumwnl, color=color.new(#ff44f6, 0))



max := max[1] > 0 ? pall > max[1] ? pall : max[1] : pall > 0 ? 1 : 0

maxs := maxs[1] < 0 ? palls < maxs[1] ? palls : maxs[1] : palls < 0 ? -1 : 0




lastreset = 0.00
lastresetwin = 0.00
lastresetwin := lastresetwin[1] > 0 ? (lastreset[1]/2) == lastresetwin[1] ? 0 : win == 1 ? lastresetwin[1]+1 : lastresetwin[1] : lastreset[1] > 0 ? win == 1 ? 1 : 0 : 0

lastreset := lastreset[1] > 0 ? (lastreset[1]/2) == lastresetwin[1] ? 0 : win == 1 ? lastreset[1]+1 : lose == 1 ? lastreset[1]+1 : lastreset[1] : win == 1 ? 1 : lose == 1 ? 1 : 0

plot((lastreset/2)-lastresetwin, color=color.new(#ffc1c1, 0))
plot(lastresetwin, color=color.new(color.green, 0))
plot(lastreset/2, color=color.new(#ff1616, 0))
plot((lastreset/2)*0.975, color=color.new(#ff7c3f, 0))
plot((lastreset/2)*0.95, color=color.new(#ffdf52, 0))
plot((lastreset/2)*0.9, color=color.new(#97ff52, 0))
plot((lastreset/2)*0.8, color=color.new(#52fff6, 0))
plot((lastreset/2)*0.7, color=color.new(#526cff, 0))
plot((lastreset/2)*0.6, color=color.new(#ee2eff, 0))
plot((lastreset/2)*0.5, color=color.new(#ffffff, 0))
plot((lastresetwin/lastreset)*100)

//if barstate.islast
//label.new(bar_index, 0, "Array size: " + str.tostring(array.size(a)) + "nbar_index: " + str.tostring(array.sum(a)), size = size.large)



var tb = table.new(position.top_right,2,4,bgcolor=color.gray)

var float upper_prz = na
var float lower_prz = na
var float d_y = na

aaas = 1

if aaas == 1
table.cell(tb,0,0,'♟️ MKN SETUP 2023 CBC OLD',text_color=color.white,text_halign=text.align_left)
// table.cell(tb,0,1,'⏫ Long signal : '+'('+str.tostring(dataset)+') '+ str.tostring(((dataset+1)/((dataset+1)+1))*100) +'%'+'n📊 '+str.tostring(100*(datasetwins/(datasetwins+datasetloses)))+'%'+ ' n----n'+'⏬ Short signal : ' +'('+str.tostring(datasetput)+') '+ str.tostring(((datasetput+1)/((datasetput+1)+1))*100)+'%'+'n📊 '+str.tostring(100*(datasetputwins/(datasetputwins+datasetputloses)))+'%'+'n----n'+'💰TP : '+str.tostring(tpmain)+'n🔥SL : '+str.tostring(slmain)+'n💛Entry 1 : '+str.tostring(entrymain)+'n🧡Entry 2 : '+str.tostring(secondentry)+'n❤️Entry 3 : '+str.tostring(thirdentry)+'n----n'+'❤️ Range : ' +str.tostring(TP)+'%n⚔️ MAX : ' +str.tostring(maxmg) +'n'+str.tostring(miss)+' / '+str.tostring(misstwo)+' / '+str.tostring(missthree)+' / '+str.tostring(missfour)+' / '+str.tostring(missfive)+' / '+str.tostring(misssix)+' / '+str.tostring(missseven)+' / '+str.tostring(misseight)+'n'+str.tostring(winratethree)+' / '+str.tostring(numgoget+losetrades+losetradeshorts)+' / '+str.tostring(100*(winratethree/(numgoget+losetrades+losetradeshorts)))+'% / '+str.tostring(miss+misstwo+missthree+missfour+missfive+misssix+missseven+misseight),text_color=color.white,text_halign=text.align_left)
// table.cell(tb,0,1,'📊 Winrate LT : '+str.tostring((1/(1+1))*100)+'%'+'n💛Win : '+str.tostring(array.sum(a))+'n🧡Lose : '+str.tostring(sizes - array.sum(a))+'n'+str.tostring((green/(green+red))*100) ,text_color=color.white,text_halign=text.align_left)
// table.cell(tb,0,1,'📊 Winrate LT : '+str.tostring((1/(1+1))*100)+'%'+'n📊 Winrate : '+str.tostring(winrate*100)+'%'+'n💛 Win : '+str.tostring(array.sum(a))+'('+str.tostring(max)+')'+'n🧡 Lose : '+str.tostring(sizes - array.sum(a))+'('+str.tostring(maxs)+')'+'n📈 COW : '+str.tostring((((stack+1)/((stack+1)+1))*100)+(50-array.sum(a)))+'%'+'('+str.tostring(topstack)+')' ,text_color=color.white,text_halign=text.align_left)
table.cell(tb,0,1,'📊 Winrate LT : '+str.tostring((1/(1+1))*100)+'%'+'n📊 Winrate : '+str.tostring(winrate*100)+'%'+'n💛 Win : '+str.tostring(array.sum(a))+'n🧡 Lose : '+str.tostring(sizes - array.sum(a))+'n📈 COW : '+str.tostring((((stack+1)/((stack+1)+1))*100)+((50-array.sum(a))/100))+'%'+'('+str.tostring(topstack)+')'+' SF : ('+str.tostring(stack)+')'+'n📈 P.Bar : '+str.tostring(bartrade)+"n📈 All time BT : "+str.tostring(cc)+'n📈 Last 10 : ('+str.tostring(sumwnl)+')'+' MAX : ('+str.tostring(maxsumtrade)+')'+'('+str.tostring(sumtrade)+')' ,text_color=color.white,text_halign=text.align_left)


table.cell(tb,0,3,'❤️ Youtube : Mark Narathip',text_color=color.white,text_halign=text.align_left)

/////////////

win90 = win == 1 ? cow[1] > 89 ? 1 : na : na
lose90 = lose == 1 ? cow[1] > 89 ? 1 : na : na

plotshape(win, title='Win', text='Win', textcolor=color.new(#ffffff, 0), style=shape.labeldown, location=location.abovebar, color=#0077ff, size=size.small, offset = -1)
plotshape(lose, title='Lose', text='Lose', textcolor=color.new(#000000, 0), style=shape.labeldown, location=location.abovebar, color=#9c9c9c, size=size.small, offset = -1)

call = tradecall[1] > 0 ? na : tradecall > 0 ? 1 : na
put = tradeput[1] > 0 ? na : tradeput > 0 ? 1 : na

call90 = tradecall[1] > 0 ? na : tradecall > 0 ? cow > 89 ? 1 : na : na
put90 = tradeput[1] > 0 ? na : tradeput > 0 ? cow > 89 ? 1 : na : na

plotshape(call, title='Call', text='Call', textcolor=color.new(#000000, 0), style=shape.labelup, location=location.belowbar, color=#00ff55, size=size.small)
plotshape(put, title='Put', text='Put', textcolor=color.new(#ffffff, 0), style=shape.labelup, location=location.belowbar, color=#ff0000, size=size.small)

//plot(pwin)

plot(60, color=color.new(color.red, 0))
plot(50, color=color.new(color.white, 0))
plot(40, color=color.new(color.green, 0))
plot(30, color=color.new(color.yellow, 0))















     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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.