PROTECTED SOURCE SCRIPT

SMC + FVG + EMA + Trendlines

71
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)

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.