커뮤니티

93959글 다음 사항 좀 추가 요청 드림니다.

프로필 이미지
요타
2025-09-08 07:11:10
86
글번호 193750
답변완료
ㅇ 항상 많은 도움에 고맙 습니다. ㅇ 아래 수식에 다음 3가지 사항 좀 추가 요청 드림니다. 1. "hh","hl","LL"등등 신호발생시 강조수식 요청 (하이킨 아시) ## Var10 = MA(C,20) ; ## 여기에 아래 수식 적용 방식을 모르겠습니다. if (H+L) / 2 >= Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); } if (H+L) / 2 < Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(0,125,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound10.wav"); } 2. "hh","hl","LL"등등 신호발생시 수직선 및 소리음 어디에 넣어야 하나요? 3. C[1]까지 연결선( 신호없는 반대편 마지막 부터 C[1] 까지 연결선) ## 아래 수식 input : prd(20); input : baseAPT(20); input : useAdapt(false); input : volBias(10.0); input : highS(Blue); input : lowS(red); input : S(Blue); input : R(red); input : xx(2); var : b(0); var : ph(Nan),pl(Nan),phl(0),plL(0),prev(Nan),dir(0); var : atrLen(50); var : aha(0),atr(0),apa(0),atrAvg(0),ratio(0); var : aptRaw(0),aptClamped(0),aptSeries(0); var : hlc3(0),p(0),vol(0); b = index; ph = iff(nthhighestbar(1,high, prd) == 0 , high , ph); pl = iff(nthlowestbar(1,low, prd) == 0 , low , pl); phL = iff(nthhighestbar(1,high, prd) == 0 , b , phL); plL = iff(nthlowestbar(1,low, prd) == 0 , b , plL); dir = iff(phL > plL , 1 , -1); aha = 1 / atrLen ; atr = IFf(IsNan(atr[1]) == true, ma(TrueRange,atrLen) , aha * TrueRange + (1 - aha) * IFf(isnan(atr[1])==true,0,atr[1])); apa = 1/atrLen; atrAvg = IFf(IsNan(atrAvg[1]) == true , ma(atr, atrLen) , apa * atr + (1 - apa) * iff(IsNan(atrAvg[1]) == true,0,atrAvg[1])); ratio = iff(atrAvg > 0 , atr / atrAvg , 1.0); aptRaw = iff(useAdapt , baseAPT / pow(ratio, volBias) , baseAPT); aptClamped = max(5.0, min(300.0, aptRaw)); aptSeries = round(aptClamped,0); hlc3 = (h+l+c)/3; if Index == 0 Then { P = hlc3 * volume; vol = volume; } var : x(0),y(0),loc(0),col(0),txt(""),barsback(0),vap(0),i(0); var : apt_i(0),alpha(0),pxv(0),v_i(0),vappe(0),decay(0),apt_0(0),v0(0); var : aa(0),tx(0),txx(0); if dir != dir[1] Then { x = iff(dir > 0 , plL , phL); y = iff(dir > 0 , pl , ph); loc = iff(dir > 0 , 0,1); col = iff(dir > 0 , highS , lowS); if dir > 0 and pl < prev Then txt = "LL"; Else { if dir > 0 and pl > prev Then txt = "HL"; Else { if dir < 0 and ph < prev Then txt = "LH"; Else { if dir < 0 and ph > prev Then txt = "HH"; Else txt = ""; } } } tx = Text_New(sDate[Index-x],sTime[Index-x],y,txt); Text_SetStyle(tx,2,loc); Text_SetColor(tx,col); prev = iff(dir > 0 , ph[1] , pl[1]); barsback = b - x; p = y * volume[barsback]; vol = volume[barsback]; vap = p / vol; for i = barsback downto 0 { apt_i = aptSeries[i]; decay = exp(-log(2.0) /max(1.0, apt_i)); alpha =1.0 - decay; pxv = hlc3[i] * volume[i]; v_i = volume[i]; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v_i; vappe = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate[i],sTime[i],vappe,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } } else { apt_0 = aptSeries; decay = exp(-log(2.0) /max(1.0, apt_0)); alpha =1.0 - decay; pxv = hlc3 * volume; v0 = volume; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v0; vap = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate,sTime,vap,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } ㅇ 항상 많은 도움 고맙습니다. 좋은 한주 되십시요.
지표
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2025-09-08 13:12:22

안녕하세요 예스스탁입니다. ## 아래 수식 input : prd(20); input : baseAPT(20); input : useAdapt(false); input : volBias(10.0); input : highS(Blue); input : lowS(red); input : S(Blue); input : R(red); input : xx(2); var : b(0); var : ph(Nan),pl(Nan),phl(0),plL(0),prev(Nan),dir(0); var : atrLen(50); var : aha(0),atr(0),apa(0),atrAvg(0),ratio(0); var : aptRaw(0),aptClamped(0),aptSeries(0); var : hlc3(0),p(0),vol(0),tl(0),vtl(0); b = index; ph = iff(nthhighestbar(1,high, prd) == 0 , high , ph); pl = iff(nthlowestbar(1,low, prd) == 0 , low , pl); phL = iff(nthhighestbar(1,high, prd) == 0 , b , phL); plL = iff(nthlowestbar(1,low, prd) == 0 , b , plL); dir = iff(phL > plL , 1 , -1); aha = 1 / atrLen ; atr = IFf(IsNan(atr[1]) == true, ma(TrueRange,atrLen) , aha * TrueRange + (1 - aha) * IFf(isnan(atr[1])==true,0,atr[1])); apa = 1/atrLen; atrAvg = IFf(IsNan(atrAvg[1]) == true , ma(atr, atrLen) , apa * atr + (1 - apa) * iff(IsNan(atrAvg[1]) == true,0,atrAvg[1])); ratio = iff(atrAvg > 0 , atr / atrAvg , 1.0); aptRaw = iff(useAdapt , baseAPT / pow(ratio, volBias) , baseAPT); aptClamped = max(5.0, min(300.0, aptRaw)); aptSeries = round(aptClamped,0); hlc3 = (h+l+c)/3; if Index == 0 Then { P = hlc3 * volume; vol = volume; } var : x(0),y(0),loc(0),col(0),txt(""),barsback(0),vap(0),i(0); var : apt_i(0),alpha(0),pxv(0),v_i(0),vappe(0),decay(0),apt_0(0),v0(0); var : aa(0),tx(0),txx(0); if dir != dir[1] Then { TL_Delete(tl); value1 = sDate[1]; value2 = sTime[1]; value3 = vap[1]; x = iff(dir > 0 , plL , phL); y = iff(dir > 0 , pl , ph); loc = iff(dir > 0 , 0,1); col = iff(dir > 0 , highS , lowS); if dir > 0 and pl < prev Then { txt = "LL"; PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); vtl = TL_New(sdate,sTime,0,sDate,stime,9999999999); } Else { if dir > 0 and pl > prev Then { txt = "HL"; PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); vtl = TL_New(sdate,sTime,0,sDate,stime,9999999999); } Else { if dir < 0 and ph < prev Then { txt = "LH"; PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); vtl = TL_New(sdate,sTime,0,sDate,stime,9999999999); } Else { if dir < 0 and ph > prev Then { txt = "HH"; PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); vtl = TL_New(sdate,sTime,0,sDate,stime,9999999999); } Else txt = ""; } } } tx = Text_New(sDate[Index-x],sTime[Index-x],y,txt); Text_SetStyle(tx,2,loc); Text_SetColor(tx,col); prev = iff(dir > 0 , ph[1] , pl[1]); barsback = b - x; p = y * volume[barsback]; vol = volume[barsback]; vap = p / vol; for i = barsback downto 0 { apt_i = aptSeries[i]; decay = exp(-log(2.0) /max(1.0, apt_i)); alpha =1.0 - decay; pxv = hlc3[i] * volume[i]; v_i = volume[i]; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v_i; vappe = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate[i],sTime[i],vappe,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } tl = TL_New(value1,Value2,Value3,sDate,sTime,vap); } else { apt_0 = aptSeries; decay = exp(-log(2.0) /max(1.0, apt_0)); alpha =1.0 - decay; pxv = hlc3 * volume; v0 = volume; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v0; vap = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate,sTime,vap,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); TL_SetEnd(tl,sDate,sTime,vap); } 즐거운 하루되세요 > 요타 님이 쓴 글입니다. > 제목 : 93959글 다음 사항 좀 추가 요청 드림니다. > ㅇ 항상 많은 도움에 고맙 습니다. ㅇ 아래 수식에 다음 3가지 사항 좀 추가 요청 드림니다. 1. "hh","hl","LL"등등 신호발생시 강조수식 요청 (하이킨 아시) ## Var10 = MA(C,20) ; ## 여기에 아래 수식 적용 방식을 모르겠습니다. if (H+L) / 2 >= Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); } if (H+L) / 2 < Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(0,125,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound10.wav"); } 2. "hh","hl","LL"등등 신호발생시 수직선 및 소리음 어디에 넣어야 하나요? 3. C[1]까지 연결선( 신호없는 반대편 마지막 부터 C[1] 까지 연결선) ## 아래 수식 input : prd(20); input : baseAPT(20); input : useAdapt(false); input : volBias(10.0); input : highS(Blue); input : lowS(red); input : S(Blue); input : R(red); input : xx(2); var : b(0); var : ph(Nan),pl(Nan),phl(0),plL(0),prev(Nan),dir(0); var : atrLen(50); var : aha(0),atr(0),apa(0),atrAvg(0),ratio(0); var : aptRaw(0),aptClamped(0),aptSeries(0); var : hlc3(0),p(0),vol(0); b = index; ph = iff(nthhighestbar(1,high, prd) == 0 , high , ph); pl = iff(nthlowestbar(1,low, prd) == 0 , low , pl); phL = iff(nthhighestbar(1,high, prd) == 0 , b , phL); plL = iff(nthlowestbar(1,low, prd) == 0 , b , plL); dir = iff(phL > plL , 1 , -1); aha = 1 / atrLen ; atr = IFf(IsNan(atr[1]) == true, ma(TrueRange,atrLen) , aha * TrueRange + (1 - aha) * IFf(isnan(atr[1])==true,0,atr[1])); apa = 1/atrLen; atrAvg = IFf(IsNan(atrAvg[1]) == true , ma(atr, atrLen) , apa * atr + (1 - apa) * iff(IsNan(atrAvg[1]) == true,0,atrAvg[1])); ratio = iff(atrAvg > 0 , atr / atrAvg , 1.0); aptRaw = iff(useAdapt , baseAPT / pow(ratio, volBias) , baseAPT); aptClamped = max(5.0, min(300.0, aptRaw)); aptSeries = round(aptClamped,0); hlc3 = (h+l+c)/3; if Index == 0 Then { P = hlc3 * volume; vol = volume; } var : x(0),y(0),loc(0),col(0),txt(""),barsback(0),vap(0),i(0); var : apt_i(0),alpha(0),pxv(0),v_i(0),vappe(0),decay(0),apt_0(0),v0(0); var : aa(0),tx(0),txx(0); if dir != dir[1] Then { x = iff(dir > 0 , plL , phL); y = iff(dir > 0 , pl , ph); loc = iff(dir > 0 , 0,1); col = iff(dir > 0 , highS , lowS); if dir > 0 and pl < prev Then txt = "LL"; Else { if dir > 0 and pl > prev Then txt = "HL"; Else { if dir < 0 and ph < prev Then txt = "LH"; Else { if dir < 0 and ph > prev Then txt = "HH"; Else txt = ""; } } } tx = Text_New(sDate[Index-x],sTime[Index-x],y,txt); Text_SetStyle(tx,2,loc); Text_SetColor(tx,col); prev = iff(dir > 0 , ph[1] , pl[1]); barsback = b - x; p = y * volume[barsback]; vol = volume[barsback]; vap = p / vol; for i = barsback downto 0 { apt_i = aptSeries[i]; decay = exp(-log(2.0) /max(1.0, apt_i)); alpha =1.0 - decay; pxv = hlc3[i] * volume[i]; v_i = volume[i]; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v_i; vappe = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate[i],sTime[i],vappe,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } } else { apt_0 = aptSeries; decay = exp(-log(2.0) /max(1.0, apt_0)); alpha =1.0 - decay; pxv = hlc3 * volume; v0 = volume; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v0; vap = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate,sTime,vap,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } ㅇ 항상 많은 도움 고맙습니다. 좋은 한주 되십시요.
프로필 이미지

요타

2025-09-08 13:38:00

요타 님에 의해 삭제된 답변입니다.