답변완료
키움수식을 예스랭귀지(종목검색수식)로 변환부탁드립니다.
Input: shortperiod(9),midperiod(26),longperiod(52);
var:A(0),B(0);
A=(highest(high,shortperiod)
+lowest(low,shortperiod)
+highest(high,midperiod)
+lowest(low,midperiod))/4;
B=(highest(high,longperiod)
+lowest(low,longperiod))/2;
Plot1(A);
plot2(B);
FixPlotShift(1,midperiod-1);
FixPlotShift(2,midperiod-1);
if sDate!=sDate[1] Then
Condition1=False;
if crossup(C,Max(A,B)) Then
Condition1=true;
if Condition1==true Then
Find(1);
2024-12-06
504
글번호 186008
종목검색
답변완료
가격채널 당일
INPUT : LENGTH(200);
VAR : TCHAN(0), BCHAN(0),TL(0);
TCHAN = HIGHEST(HIGH, LENGTH);
BCHAN = LOWEST(LOW, LENGTH);
PLOT1(TCHAN, "TOP");
PLOT2(BCHAN, "BOT");
if H == TCHAN and (var11 == 0 or (var11 > 0 and Index > var11+100)) Then
{
var11 = Index;
TL= TL_New(sdate,sTime,0,sDate,sTime,999);
TL_SetSize(TL,2);
TL_SetColor(TL,Cyan);
}
if L == BCHAN and (var21 == 0 or (var21 > 0 and Index > var21+100)) Then
{
var21 = Index;
TL= TL_New(sdate,sTime,0,sDate,sTime,999);
TL_SetSize(TL,2);
TL_SetColor(TL,Gold);
}
전일과 연관없이 당일 시초부터 계산. 감사합니다.
2024-12-06
612
글번호 186006
지표
답변완료
수식전환 요청드립니다.
안녕하세요.
아래의 트레이딩뷰 지표수식을 예스트레이더 형식으로 변환을 요청드립니다.
감사합니다. (첨부파일 참조해 주십시오)
showSignal = input(title="Show Signal ?", type=input.bool, defval=true)
signalType = input(title="Signal Smoothing Type", defval="SMA", options=["EMA", "SMA"])
signalLength = input(title="Signal Smoothing Length", type=input.integer, defval=21)
src = input(title="Source", type=input.source, defval=close)
highlightCrossovers = input(title="Highlight Crossovers ?", type=input.bool, defval=false)
applyFilling = input(title="Apply Ribbon Filling ?", type=input.bool, defval=true)
signal = signalType == "EMA" ? ema(pvt, signalLength) : sma(pvt, signalLength)
trendColor = pvt > signal ? #0ebb23 : color.red
pvtColor = applyFilling ? trendColor : #0094ff
signalColor = applyFilling ? trendColor : #ff6a00
pvtPlot = plot(pvt, title="PVT", linewidth=2, color=pvtColor, transp=0)
signalPlot = plot(showSignal ? signal : na, title="Signal", color=signalColor, transp=0)
transparent = color.new(color.white, 100)
fillColor = applyFilling ? trendColor : transparent
fill(pvtPlot, signalPlot, color=fillColor, transp=70)
buyAlert = crossover(pvt, signal)
sellAlert = crossunder(pvt, signal)
plotshape(buyAlert and highlightCrossovers ? pvt : na, title="Crossover", location=location.absolute, style=shape.circle, size=size.tiny, color=color.green, transp=0)
plotshape(sellAlert and highlightCrossovers ? pvt : na, title="Crossunder", location=location.absolute, style=shape.circle, size=size.tiny, color=color.red, transp=0)
alertcondition(buyAlert, title="Alert: Buy", message="Buy
Symbol: {{exchange}}:{{ticker}}
Price: {{close}}")
alertcondition(sellAlert, title="Alert: Sell", message="Sell
Symbol: {{exchange}}:{{ticker}}
Price: {{close}}")
2024-12-06
609
글번호 186004
지표
답변완료
수식전환 요청드립니다.
안녕하세요.
아래 트레이딩뷰 지표를 예스트레이더 형식으로 전환 부탁드립니다.
감사합니다.
//@version=3
study("Better RSI")
cycler = na
myPeriod = input(defval = 14, type=integer, title="Period")
src = input(close, type=source)
showCycler = input(true,'Show cycler?')
lvl = input(50, 'Cycler level on plot')
myRSI = rsi(src, myPeriod)
firstcolor = color(white,10)
secondcolor = color(orange,50)
thirdcolor = gray
h30 = hline(30,color=firstcolor,linestyle=dashed,title='Low')
h70 = hline(70,color=firstcolor,linestyle=dashed,title = 'High')
h20 = hline(20, color=secondcolor,linestyle = solid,title='Second low')
h80 = hline(80, color=secondcolor,linestyle=solid,title='Second high')
//h50 = hline(50, color=orange, title= 'Mid line')
h40 = hline(40, color = thirdcolor, linestyle = dashed,title = '40 line')
h60 = hline(60, color = thirdcolor, linestyle = dashed, title = '60 line')
//fill(h30,h20,red,transp=80, title='Oversold color')
//fill(h80,h70,red,transp=80, title='Overbought color')
fill(h30,h70,fuchsia,transp=90, title= 'Background color')
//cond =? red:white
RSIplot = plot(myRSI,color=white,linewidth=2,transp=0,title="RSI")
plot(myRSI >= 70 or myRSI<= 30? myRSI:na,style = linebr,linewidth=3,color=red,transp = 0, title = 'Oversold color')
//cycler
cycler := if myRSI > 69 or myRSI< 31
a = if myRSI > 69
1 // bullish
else
2 // bearish
a
else
b = if (nz(cycler[1]) == 1 and myRSI < 39) or (nz(cycler[1]) == 2 and myRSI > 61)
0
else
nz(cycler[1])
b
mycolor = if cycler == 0
white
else
c = if cycler == 1
lime
else
red
c
plot(showCycler? lvl:na, style = line, color = mycolor, transp = 30, linewidth=2, title = 'Cycler colors')
2024-12-06
645
글번호 186003
지표