커뮤니티

문의합니다..^^*

프로필 이미지
서민순
2026-05-31 10:04:13
74
글번호 232225
답변완료


1.아래지표수식에 DarkBrown 라인이 40 이평선하고 근접 또는 수렴할떄 종목이 검색될수 있도록 부탁드립니다..

2.아래지표수식에 GOLD 라인이 40이평을 돌파할때 종목이 검색될수 있도록 부탁드립니다.

무더운 날씨인데 항상 답변 감사드립니다....

input : ATRperiod(14);

input : BBperiod(20);

input : BBdeviation(1.5);

input : UseATRfilter(true);

input : showsignals(true);

var : BBupper(0),BBlower(0),alpha(0),atrValue(0);

var : FollowLine(Nan),BBSignal(0),iTrend(0);


BBUpper = ma(close, BBperiod) + std(close, BBperiod) * BBdeviation;

BBLower = ma(close, BBperiod) - std(close, BBperiod) * BBdeviation;


alpha = 1 / ATRperiod ;

atrValue =  IFf(IsNan(atrValue[1]) == true, ma(TrueRange,ATRperiod) , alpha * TrueRange + (1 - alpha) * IFf(isnan(atrValue[1])==true,0,atrValue[1]));


if (close > BBUpper) Then

    BBSignal = 1;

else if (close < BBLower) Then

    BBSignal = -1;


if (BBSignal == 1)  Then

{

    if (UseATRfilter)  Then

      {

        FollowLine = low - atrValue;

      }

    else

      {

        FollowLine = low;

      }

    if (FollowLine < iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then

      {

        FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]);

      }

}


if (BBSignal == -1) Then

{

    if (UseATRfilter) Then

      {

        FollowLine = high + atrValue;

      }

    else

      {

        FollowLine = high;

      }

    if (FollowLine > iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then

      {

        FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]);

      }

}


if iff(IsNan(FollowLine)==true,0,FollowLine) > iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then

    iTrend = 1;

else if iff(IsNan(FollowLine)==true,0,FollowLine) < iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then

    iTrend = -1;


var : lineColor(0),B(0),S(0),tx(0);


lineColor = iff(iTrend > 0 , Gold , DarkBrown);


b = iff(iTrend[1]==-1 and iTrend==1 , 1 , 0);

s =      iff(iTrend[1]==1 and iTrend==-1 , 1 , 0);


plot1(FollowLine, "Follow Line", lineColor);



if B == 1 and showsignals Then

{

      tx = text_new(sDate,stime,L,"▲");

      Text_SetColor(tx,ReD);

      Text_SetStyle(tx,2,0);

}


if S == 1 and showsignals Then

{

      tx = text_new(sDate,stime,H,"▼");

      Text_SetColor(tx,WhitE);

      Text_SetStyle(tx,2,1);

}

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

예스스탁 예스스탁 답변

2026-06-01 13:06:36

안녕하세요 예스스탁입니다. 1 일정% 이내로 수렴된 종목을 찾게 됩니다. input : ATRperiod(14); input : BBperiod(20); input : BBdeviation(1.5); input : UseATRfilter(true); input : showsignals(true); input : 수렴(2);//% var : BBupper(0),BBlower(0),alpha(0),atrValue(0); var : FollowLine(Nan),BBSignal(0),iTrend(0); BBUpper = ma(close, BBperiod) + std(close, BBperiod) * BBdeviation; BBLower = ma(close, BBperiod) - std(close, BBperiod) * BBdeviation; alpha = 1 / ATRperiod ; atrValue =IFf(IsNan(atrValue[1]) == true, ma(TrueRange,ATRperiod) , alpha * TrueRange + (1 - alpha) * IFf(isnan(atrValue[1])==true,0,atrValue[1])); if (close > BBUpper) Then BBSignal = 1; else if (close < BBLower) Then BBSignal = -1; if (BBSignal == 1)Then { if (UseATRfilter)Then { FollowLine = low - atrValue; } else { FollowLine = low; } if (FollowLine < iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then { FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]); } } if (BBSignal == -1) Then { if (UseATRfilter) Then { FollowLine = high + atrValue; } else { FollowLine = high; } if (FollowLine > iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then { FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]); } } if iff(IsNan(FollowLine)==true,0,FollowLine) > iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then iTrend = 1; else if iff(IsNan(FollowLine)==true,0,FollowLine) < iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then iTrend = -1; var : lineColor(0),B(0),S(0),tx(0); lineColor = iff(iTrend > 0 , Gold , DarkBrown); b = iff(iTrend[1]==-1 and iTrend==1 , 1 , 0); s =iff(iTrend[1]==1 and iTrend==-1 , 1 , 0); var : mav(0); mav = ma(C,40); if lineColor == DarkBrown and max(FollowLine,mav) <= min(FollowLine,mav)*(1+수렴/100) Then Find(1); 2 input : ATRperiod(14); input : BBperiod(20); input : BBdeviation(1.5); input : UseATRfilter(true); input : showsignals(true); input : 수렴(2);//% var : BBupper(0),BBlower(0),alpha(0),atrValue(0); var : FollowLine(Nan),BBSignal(0),iTrend(0); BBUpper = ma(close, BBperiod) + std(close, BBperiod) * BBdeviation; BBLower = ma(close, BBperiod) - std(close, BBperiod) * BBdeviation; alpha = 1 / ATRperiod ; atrValue =IFf(IsNan(atrValue[1]) == true, ma(TrueRange,ATRperiod) , alpha * TrueRange + (1 - alpha) * IFf(isnan(atrValue[1])==true,0,atrValue[1])); if (close > BBUpper) Then BBSignal = 1; else if (close < BBLower) Then BBSignal = -1; if (BBSignal == 1)Then { if (UseATRfilter)Then { FollowLine = low - atrValue; } else { FollowLine = low; } if (FollowLine < iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then { FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]); } } if (BBSignal == -1) Then { if (UseATRfilter) Then { FollowLine = high + atrValue; } else { FollowLine = high; } if (FollowLine > iff(IsNan(FollowLine[1])==true,0,FollowLine[1])) Then { FollowLine = iff(IsNan(FollowLine[1])==true,0,FollowLine[1]); } } if iff(IsNan(FollowLine)==true,0,FollowLine) > iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then iTrend = 1; else if iff(IsNan(FollowLine)==true,0,FollowLine) < iff(IsNan(FollowLine[1])==true,0,FollowLine[1]) Then iTrend = -1; var : lineColor(0),B(0),S(0),tx(0); lineColor = iff(iTrend > 0 , Gold , DarkBrown); b = iff(iTrend[1]==-1 and iTrend==1 , 1 , 0); s =iff(iTrend[1]==1 and iTrend==-1 , 1 , 0); var : mav(0); mav = ma(C,40); if lineColor == Gold and CrossUp(FollowLine,mav) Then Find(1); 즐거운 하루되세요