커뮤니티

수정문의

프로필 이미지
ksks
2026-05-03 10:33:48
136
글번호 231864
답변완료

트레이딩뷰의 Pro RSI Calculator인데 이를 바탕으로 종가가

1. 0봉에 종가가 가격차트에 표시된 RSI(14)의 "중간선을 돌파(Crossup)"하는 봉을 검색.(종가>중간선이 아님)

2.별도로, "슈퍼트렌드 돌파  후  0~ 4봉에 종가가 상단선돌파"하는 것을 검색하려 합니다.

    (0봉에 상단선돌파 & 4봉전 슈퍼트렌드돌파 or

                  "                    & 3         " or

                  "                    &  2        " or

                  "                    &  1         " or

                   "                   &  0        "                             )

(CrossUp(c,supertrend)로 기 작성해주신 수식이 있으나 위의 "4봉전~0봉전 돌파" 때문에 합성해 사용하기가 어렵습니다.)  


eL=2*LenRSI-1;

gR=if(C-C(1)>0,C-C(1),0);

lR=if(C(1)-C>0,C(1)-C,0);

gE=eavg(gR,eL);

lE=eavg(lR,eL);

x1=(LenRSI-1)*(lE*LowPct/(100-LowPct)-gE);

bL=if(x1>=0,C+x1,C+x1*(100-LowPct)/LowPct);

x2=(LenRSI-1)*(lE*UppPct/(100-UppPct)-gE);

bH=if(x2>=0,C+x2,C+x2*(100-UppPct)/UppPct);

bM=(bH+bL)/2;

bMH=(bH+bM)/2;

bML=(bM+bL)/2;

cUL=if(C(1)<bL(1) and C>=bL,1,0);

cDH=if(C(1)>bH(1) and C<=bH,1,0);

cUM=if(Crossup(C, bM),1,0);

cDM=if(C(1)>bM(1) and C<=bM,1,0);


Crossup(C, bM)

지표변수

    LenRSI  14, UppPct  70,  LowPct  30,  FM  5

종목검색
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2026-05-06 11:11:54

안녕하세요 예스스탁입니다. 1 input : lenrsi(14),upppct(70),lowpct(30),fm(5); var : el(0),gr(0),lr(0),ge(0),le(0),x1(0); var : bl(0),x2(0),bh(0),bm(0),bmh(0),bml(0); var : cul(0),cdh(0),cum(0),cdm(0); eL=2*LenRSI-1; gR=iff(C-C[1]>0,C-C[1],0); lR=iff(C[1]-C>0,C[1]-C,0); gE=Ema(gR,eL); lE=Ema(lR,eL); x1=(LenRSI-1)*(lE*LowPct/(100-LowPct)-gE); bL=iff(x1>=0,C+x1,C+x1*(100-LowPct)/LowPct); x2=(LenRSI-1)*(lE*UppPct/(100-UppPct)-gE); bH=iff(x2>=0,C+x2,C+x2*(100-UppPct)/UppPct); bM=(bH+bL)/2; bMH=(bH+bM)/2; bML=(bM+bL)/2; cUL=iff(C[1]<bL[1] and C>=bL,1,0); cDH=iff(C[1]>bH[1] and C<=bH,1,0); cUM=iff(Crossup(C, bM),1,0); cDM=iff(C[1]>bM[1] and C<=bM,1,0); if Crossup(C, bM) Then Find(1); 2 input : lenrsi(14),upppct(70),lowpct(30),fm(5); var : el(0),gr(0),lr(0),ge(0),le(0),x1(0); var : bl(0),x2(0),bh(0),bm(0),bmh(0),bml(0); var : cul(0),cdh(0),cum(0),cdm(0); input : period(10),multiplier(3); var : src(0), alpha(0),ATRV(0),upperBand(0),lowerBand(0),direction(0),SuperTrend(C); eL=2*LenRSI-1; gR=iff(C-C[1]>0,C-C[1],0); lR=iff(C[1]-C>0,C[1]-C,0); gE=Ema(gR,eL); lE=Ema(lR,eL); x1=(LenRSI-1)*(lE*LowPct/(100-LowPct)-gE); bL=iff(x1>=0,C+x1,C+x1*(100-LowPct)/LowPct); x2=(LenRSI-1)*(lE*UppPct/(100-UppPct)-gE); bH=iff(x2>=0,C+x2,C+x2*(100-UppPct)/UppPct); bM=(bH+bL)/2; bMH=(bH+bM)/2; bML=(bM+bL)/2; cUL=iff(C[1]<bL[1] and C>=bL,1,0); cDH=iff(C[1]>bH[1] and C<=bH,1,0); cUM=iff(Crossup(C, bM),1,0); cDM=iff(C[1]>bM[1] and C<=bM,1,0); if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / period ; ATRV = IFf(IsNan(ATRV[1]) == true, ma(TrueRange,period) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATRV[1])==true,0,ATRV[1])); upperBand = src + multiplier * AtrV; lowerBand = src - multiplier * AtrV; if lowerBand > lowerBand[1] or close[1] < lowerBand[1] Then lowerBand = lowerBand; Else lowerBand = lowerBand[1]; if upperBand < upperBand[1] or close[1] > upperBand[1] Then upperBand = upperBand; Else upperBand = upperBand[1]; if C > UpperBand Then direction = 1; if C < LowerBand Then direction = -1; if direction == 1 Then SuperTrend = lowerband; Else SuperTrend = upperband; } if CountIf(CrossUp(C,supertrend),5) >= 1 and Crossup(C, bH) Then Find(1); 즐거운 하루되세요
프로필 이미지

ksks

2026-05-06 11:53:37

예, 심심한 감사드립니다.

2번의 input중 period(10)이 14가 아닌가요?
지난번 종가가 슈퍼트레이드 돌파 수식 INPUT에 AtrPeriod(14)로 되어 있어서요.

input : AtrPeriod(14),factor(3); var : src(0), AtrV(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0); var : prevSuperTrend(0), superTrend(C), direction(0),alpha(0),source(0); if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / AtrPeriod ; source = max(high - low, abs(high - close[1]), abs(low - close[1])); ATrV = alpha * source + (1 - alpha) * ATrV[1]; //지수가중이평방식 //ATrV = ma(source,AtrPeriod); //단순이평방식 upperBand = src + factor * AtrV; lowerBand = src - factor * AtrV; prevLowerBand = lowerBand[1]; prevUpperBand = upperBand[1]; if lowerBand > prevLowerBand or close[1] < prevLowerBand Then lowerBand = lowerBand; Else lowerBand = prevLowerBand; if upperBand < prevUpperBand or close[1] > prevUpperBand Then upperBand = upperBand; Else upperBand = prevUpperBand; if C > UpperBand Then direction = 1; if C < LowerBand Then direction = -1; if direction == 1 Then supertrend = lowerband; Else supertrend = upperband; if CrossUp(c,supertrend) && C>O Then Find(1);

프로필 이미지

예스스탁 예스스탁 답변

2026-05-06 13:23:07

안녕하세요 예스스탁입니다. input변수는 고정된 값이 있는 부분이 아닙니다. 사용자분이 원하시는 값으로 변경하시면 됩니다. 즐거운 하루되세요