답변완료
수식변환 요청
파인 변환요청 드립니다.
// This Pine cript™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AlgoAlpha
//@version=5
indicator("Trend Strength Signals [AlgoAlpha]", "AlgoAlpha - 𝑻𝒓𝒆𝒏𝒅 𝑺𝒕𝒓𝒆𝒏𝒈𝒕𝒉", true)
c = input.bool(true, "Enable Cloud")
lenn = input.int(20, "Period")
mult = input.float(2.5, "Standard Deviation Multiplier for TP")
tc = input.int(25, "Gauge Size", minval = 3)
upColor = input.color(#00ffbb, "Up Color")
downColor = input.color(#ff1100, "Down Color")
// Guage Function
t = table.new(position.middle_right, 3, tc+1),
printTable(txt, col, row, color, txt1, col1, row1, color1) =>
table.cell(t, col, row, txt, bgcolor = color),
table.cell(t, col1, row1, txt1, bgcolor = color1, text_color = color.white)
len = lenn
src = close
basis = ta.sma(src, lenn)
upper = basis + ta.stdev(src, len, true)
lower = basis - ta.stdev(src, len, true)
upper1 = basis + ta.stdev(src, len, true) * mult
lower1 = basis - ta.stdev(src, len, true) * mult
var trend = 0
if src > basis and src > upper
trend := 1
if src < basis and src < lower
trend := -1
pu=plot(upper, "upper Line", color.new(chart.fg_color, 80), display = c ? display.all : display.none)
pl=plot(lower, "lower Line", color.new(chart.fg_color, 80), display = c ? display.all : display.none)
barcolor(src > upper ? upColor : src < lower ? downColor : chart.fg_color)
grad = math.abs(basis-src)/(ta.highest(basis-src, 200))*100
grad1 = math.min(grad,40)
grad1 := 100-grad1
xMax = 100
xMin = 0
range_ = xMax - xMin
y = 1 - grad / range_
y := y > 100 ? 100 : y < 0 ? 0 : y
fill(pu, pl, color.new(chart.fg_color, ta.sma(grad1, 7)), "Trend Fill", display = c ? display.all : display.none)
plotshape(ta.crossover(trend, 0), "Bullish Trend", shape.labelup, location.belowbar, upColor, text = "▲", textcolor = chart.fg_color)
plotshape(ta.crossunder(trend, 0), "Bearish Trend", shape.labeldown, location.abovebar, downColor, text = "▼", textcolor = chart.fg_color)
plotchar(ta.crossover(src, lower1), "Short TP", "X", location.belowbar, upColor, size = size.tiny)
plotchar(ta.crossunder(src, upper1), "Long TP", "X", location.abovebar, downColor, size = size.tiny)
// Draw Gauge
for i = 1 to tc
color_ = chart.fg_color
color = color.from_gradient(i, 1, tc, src > basis ? upColor : downColor, color_)
printTable("", 1, i, color, ">", 1, math.round(y*tc), #ffffff00)
///////Alerts
alertcondition(ta.cross(trend, 0), "Universal Trend Shift (when trend changes direction)")
alertcondition(ta.crossover(trend, 0), "Bullish Trend")
alertcondition(ta.crossunder(trend, 0), "Bearish Trend")
alertcondition(ta.crossover(src, lower1) or ta.crossunder(src, upper1), "Universal TP (when any TP signal triggers)")
alertcondition(ta.crossover(src, lower1), "Short TP")
alertcondition(ta.crossunder(src, upper1), "Long TP")
2025-09-16
260
글번호 194045
지표
답변완료
지표 변환 부탁드립니다.
//@version=5
indicator(title="On Balance Volume Scaled", shorttitle="OBV-Scaled", format=format.volume, timeframe="", timeframe_gaps=true)
length=input.int(100,minval=10,title="Length of Scaling", group="Settings",tooltip = "The number of candles measured for the highest price, lowest price and average price in the indicator.")
var cumVol = 0.
cumVol += nz(volume)
if barstate.islast and cumVol == 0
runtime.error("No volume is provided by the data vendor.")
src = close
obv = ta.cum(math.sign(ta.change(src)) * volume)
highest_in_length = ta.highest(obv,length)
highest_in_length_avg= ta.ema(highest_in_length,length)
lowest_in_length = ta.lowest(obv,length)
lowest_in_length_avg= ta.ema(lowest_in_length,length)
avg_range= highest_in_length_avg - lowest_in_length_avg
middle_line =avg_range/2
normalized_obv= if obv>=middle_line
-1*((0.5-((math.abs(math.abs(obv)-math.abs(lowest_in_length_avg)))/(math.abs(avg_range))))*100)
else
1*((-0.5-((math.abs(obv)-math.abs(math.abs(lowest_in_length_avg)))/(math.abs(avg_range))))*100)
band1 = hline(50, "Upper Band", color=#787B86, linestyle=hline.style_dashed)
hline(0, "Middle Band", color=color.new(#787B86, 50))
band0 = hline(-50, "Lower Band", color=#787B86, linestyle=hline.style_dashed)
fill(band1, band0, color=color.rgb(33, 150, 243, 90), title="Background")
plot(normalized_obv, color=#2962FF, title="OnBalanceVolume")
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMA = input.string(title = "Method", defval = "SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Smoothing")
smoothingLength = input.int(title = "Length", defval = 5, minval = 1, maxval = 100, group="Smoothing")
smoothingLine = ma(normalized_obv, smoothingLength, typeMA)
plot(smoothingLine, title="Smoothing Line", color=#f37f20, display=display.none)
2025-09-16
209
글번호 194037
지표
답변완료
종목검색식 부탁드립니다
1. 지수 10 이평이 , 단순 60 이평을 골든크로스할때 종목검색식 부탁드려요.
2. 지수 10 이평이, 단순 60 이평을 골든크로스할때,
단. 0봉전 ~ 10봉전 까지의 모든종목 검색식 부탁드립니다.
3. 지수 10 이평이, 단순 60 이평 을 골든크로스 한후, 단순60이평 위에
있을때 모든종목 검색식 부탁드려요.
4. 주봉에서,
주봉의 60 "단순 이평이" 상승추세로 바뀔때 종목검색식 부탁드려요
5. 주봉에서,
주봉의 60 "지수 이평이" 상승추세 로 바뀔때 종목검색식 부탁드립니다.
6. 아래 수식을 참고하여(하단),
일봉기준차트에 주봉 10일 이평선을(단순) 긋고,
일봉차트에서 주봉 10일 이평선이(단순) , 아래 (수식1)의 이평선을 돌파하고,
위에 있을때 모든 종목 검색식 부탁드려요
---아래---
(수식1) 이평
smoothADD = ma_length + if(smoothingBool, ma_lengthSmoothing, 0);
MS = if(ma_type == 1, ma(C, smoothADD),
if(ma_type == 2, eavg(C, smoothADD),
if(ma_type == 3, ma(C, smoothADD,가중), eavg(C, smoothADD))));
MS
(수식2) 상승
if(MS(1)<MS,MS,0)
(수식3) 하락
if(MS(1)>=MS,MS,0)
- 지표조건설정
ma_length : 80
ma_lengthSmoothing : 20
smoothingBool : 0
ma_type : 2
2025-09-16
186
글번호 194034
종목검색