PROTECTED SOURCE SCRIPT
SMC + FVG + EMA + Trendlines

SMC + FVG + EMA + Trendlines legRange = math.abs(structureHigh - structureLow) // <-- เปลี่ยนชื่อจาก range -> legRange
if showCurrentStruct and not na(structureHigh) and not na(structureLow)
if na(curHighLine) == false
line.delete(curHighLine)
if na(curLowLine) == false
line.delete(curLowLine)
curHighLine := line.new(sHighIdx, structureHigh, bar_index, structureHigh, xloc.bar_index, color=currentStructColor, style=currentStructStyle, width=currentStructWidth)
curLowLine := line.new(sLowIdx, structureLow, bar_index, structureLow, xloc.bar_index, color=currentStructColor, style=currentStructStyle, width=currentStructWidth)
// ---------- Fibonacci on current leg ----------
if showFibo and legRange > 0
for k = 0 to array.size(fLevels) - 1
lvl = array.get(fLevels, k)
price = sDir == 1 ? structureHigh - (legRange - legRange * lvl)
: structureLow + (legRange - legRange * lvl)
l = line.new(sDir == 1 ? sHighIdx : sLowIdx, price, bar_index, price, xloc.bar_index, color=fiboColorMain, style=fiboStyle, width=fiboWidth)
label.new(bar_index + 10, price, str.tostring(lvl) + " (" + str.tostring(price) + ")", style=label.style_none, textcolor=fiboColorMain)
if showCurrentStruct and not na(structureHigh) and not na(structureLow)
if na(curHighLine) == false
line.delete(curHighLine)
if na(curLowLine) == false
line.delete(curLowLine)
curHighLine := line.new(sHighIdx, structureHigh, bar_index, structureHigh, xloc.bar_index, color=currentStructColor, style=currentStructStyle, width=currentStructWidth)
curLowLine := line.new(sLowIdx, structureLow, bar_index, structureLow, xloc.bar_index, color=currentStructColor, style=currentStructStyle, width=currentStructWidth)
// ---------- Fibonacci on current leg ----------
if showFibo and legRange > 0
for k = 0 to array.size(fLevels) - 1
lvl = array.get(fLevels, k)
price = sDir == 1 ? structureHigh - (legRange - legRange * lvl)
: structureLow + (legRange - legRange * lvl)
l = line.new(sDir == 1 ? sHighIdx : sLowIdx, price, bar_index, price, xloc.bar_index, color=fiboColorMain, style=fiboStyle, width=fiboWidth)
label.new(bar_index + 10, price, str.tostring(lvl) + " (" + str.tostring(price) + ")", style=label.style_none, textcolor=fiboColorMain)
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.