답변완료
검색식 문의 드립니다.
키움에서 사용하고 있는 지표입니다.
아래지표중 1번째 과매도지표중 수식3 "과매도이탈" 만을 예스트레이더로 종목검색하고 싶은데요 단, 0봉전부터~60봉전까지의 "과매도 이탈"종목을 모두 검색하는 조건식을
만들고 싶습니다. 꼭 부탁드립니다. 좋은 하루 되세요.
<극한공포(VIX FIX)- 과매도 지표>
(수식1) 매도
wvf = ((highest(C, 22) - low) / highest(C, 22)) * 100;
sDev = 2.0 * stdev(wvf, 20);
midLine = avg(wvf, 20);
upperBand = midLine + sDev;
rangeHigh = (highest(wvf, 50)) * ph;
-wvf;
(수식2) 과매도
wvf = ((highest(C, 22) - low) / highest(C, 22)) * 100;
sDev = 2.0 * stdev(wvf, 20);
midLine = avg(wvf, 20);
upperBand = midLine + sDev;
rangeHigh = (highest(wvf, 50)) * ph;
if(wvf >= upperBand or wvf >= rangeHigh, -wvf, 0);
(수식3) 과매도이탈
wvf = ((highest(C, 22) - low) / highest(C, 22)) * 100;
sDev = 2.0 * stdev(wvf, 20);
midLine = avg(wvf, 20);
upperBand = midLine + sDev;
rangeHigh = (highest(wvf, 50)) * ph;
os = (wvf >= upperBand) or (wvf >= rangeHigh);
if(os,1,0); //os : OverSold
// 과매도 4회이상 연속후 이탈)
if( ((os(1)>0 and os(2)>0 and os(3)>0 and os(4)>0) and os == 0), -wvf, 0);
-지표조건설정
PH : 0.85
==================================================
<극한공포(VIX FIX) - 과매수 지표>
(수식1) 매수
i_wvf = ((high - lowest(C, 22)) / lowest(C, 22)) * 100;
i_sDev = 2.0 * stdev(i_wvf, 20);
i_midLine = avg(i_wvf, 20);
i_upperBand = i_midLine + i_sDev;
i_rangeHigh = (highest(i_wvf, 50)) * ph;
i_wvf;
(수식2) 과매수
i_wvf = ((high - lowest(C, 22)) / lowest(C, 22)) * 100;
i_sDev = 2.0 * stdev(i_wvf, 20);
i_midLine = avg(i_wvf, 20);
i_upperBand = i_midLine + i_sDev;
i_rangeHigh = (highest(i_wvf, 50)) * ph;
if(i_wvf >= i_upperBand or i_wvf >= i_rangeHigh, i_wvf, 0);
(수식3) 과매수이탈
i_wvf = ((H - lowest(C, 22)) / lowest(C, 22)) * 100;
i_sDev = 2.0 * stdev(i_wvf, 20);
i_midLine = avg(i_wvf, 20);
i_upperBand = i_midLine + i_sDev;
i_rangeHigh = (highest(i_wvf, 50)) * ph;
ob = (i_wvf >= i_upperBand) or (i_wvf >= i_rangeHigh);
if(ob,1,0); //os : OverBuy
// 과매수 4회이상 연속후 이탈)
if( ((ob(1)>0 and ob(2)>0 and ob(3)>0 and ob(4)>0) and ob == 0), i_wvf, 0);
-지표조건설정
PH : 0.85
2024-05-05
1329
글번호 179152
종목검색
답변완료
신호수식 부탁드립니다
var : M10(0),MM(0),ms(0),dp(0),dm(0),s(0),cc(0),sr(0),r(0);
var : M_b(-1),D_b(-1),Macd_b(-1),S_b(-1),CC_b(-1),SR_b(-1),R_b(-1);
var : 조건(False);
M10 = ma(C, 10);
MM = Macd(12, 26);
Ms = Ema(MM, 9);
Dp = Diplus(14);
Dm = DiMinus(14);
S = StochasticsK(12, 5);
CC = CCi(9);
SR = ((RSI(14)- lowest(RSI(14),7)) / (highest(RSI(14),7)-(lowest(RSI(14),7))))*-1;
R = PROC(12);
if H>M10 && C==O && C<M10 Then
M_b = 0;
Else
{
if M_b >= 0 Then
M_b = M_b+1;
}
if CrossUP(Dp, Dm) && Dp<=30 Then
D_b = 0;
Else
{
if D_b >= 0 Then
D_b = D_b+1;
}
if CrossUP(mm, Ms) Then
Macd_b = 0;
Else
{
if Macd_b >= 0 Then
Macd_b = Macd_b+1;
}
if CrossUP(S, 20) Then
S_b = 0;
Else
{
if S_b >= 0 Then
S_b = S_b+1;
}
if CrossUP(CC, 0) Then
CC_b = 0;
Else
{
if CC_b >= 0 Then
CC_b = CC_b+1;
}
if SR==-1 && SR[1]!=-1 Then
SR_b = 0;
Else
{
if SR_b >= 0 Then
SR_b = SR_b+1;
}
if CrossUP(R, 0) Then
R_b = 0;
Else
{
if R_b >= 0 Then
R_b = R_b+1;
}
조건 = M_b > Max(D_b, Macd_b) &&
Min(D_b, Macd_b) > Max(S_b, CC_b, SR_b) &&
Min(S_b, CC_b, SR_b) > R_b;
if 조건 == true && 조건[1] == False Then
Find(1);
2024-05-04
1147
글번호 179146
강조
답변완료
수식 변환 부탁 드립니다.
안녕하세요!
수식 변환 부탁드립니다. 감사합니다^
/@version=5
indicator(overlay=true)
// ** ---> Inputs ------------- {
var bool positive = false
var bool negative = false
string RSI_group = "RSI Settings"
string mom_group = "Momentum Vales"
string visual = "Visuals"
int Len2 = input(14,"RSI 1️⃣",inline = "rsi",group = RSI_group)
int pmom = input(65," Positive above",inline = "rsi1",group =RSI_group )
int nmom = input(32,"Negative below",inline = "rsi1",group =RSI_group )
bool showlabels = input(true,"Show Momentum ❓",inline = "001",group =visual )
color p = input(color.rgb(76, 175, 79, 62),"Positive",inline = "001",group =visual )
color n = input(color.rgb(255, 82, 82, 66),"Negative",inline = "001",group =visual )
bool filleshow = input(true,"Show highlighter ❓",inline = "002",group =visual )
color bull = input(color.rgb(76, 175, 79, 62),"Bull",inline = "002",group =visual )
color bear = input(color.rgb(255, 82, 82, 66),"Bear",inline = "002",group =visual )
rsi = ta.rsi(close, Len2)
//------------------- }
// ** ---> Momentums ------------- {
p_mom = rsi[1] < pmom and rsi > pmom and rsi > nmom and ta.change(ta.ema(close,5)) > 0
n_mom = rsi < nmom and ta.change(ta.ema(close,5)) < 0
if p_mom
positive:= true
negative:= false
if n_mom
positive:= false
negative:= true
// ** ---> Entry Conditions ------------- {
a = plot(filleshow ? ta.ema(high,5) : na,display = display.none,editable = false)
b = plot(filleshow ? ta.ema(low,10) : na,style = plot.style_stepline,color = color.red,display = display.none,editable = false)
// fill(a,b,color = color.from_gradient(rsi14,35,pmom,color.rgb(255, 82, 82, 66),color.rgb(76, 175, 79, 64)) )
fill(a,b,color = positive ? bull :bear ,editable = false)
//plotting
pcondition = positive and not positive[1]
ncondition2 = negative and not negative[1]
plotshape(showlabels ? pcondition: na , title="Positive Signal",style=shape.labelup, color=p, location= location.belowbar , size=size.tiny,text= "Positive",textcolor = color.white)
plotshape(showlabels ? ncondition2: na , title="Negative Signal",style=shape.labeldown, color=n, location= location.abovebar , size=size.tiny,text = "Negative",textcolor = color.white)
// Alerts //
alertcondition(pcondition,"Positive Trend")
alertcondition(ncondition2,"Negative Trend")
//
2024-05-04
841
글번호 179144
지표