커뮤니티

하이킨아시 실시간

프로필 이미지
고성
2026-09-09 08:48:27
87
글번호 233548
답변완료

알려주신 수식이 약간 복잡합니다.  

혹시 다른 수식을 참고하여 간단히 할 수 있을까?

 파라볼릭 쌍바닥 쌍봉 직전 수식을 위에 올려봅니다.    수정 부탁드립니다.


Input : af(0.004), maxAF(0.2);

Var : cSarv(0),T(0),tx(0),LL(0),LL1(0),HH(0),HH1(0);

cSarv = csar(af,maxAF);

plot1(c);

If crossup(c,cSarv) Then  

{

      T = 1;   

      HH = H;             

      HH1 = HH[1];  

      var1 = cSarv;

      Text_Delete(tx);

}

If CrossDown(c,cSarv) Then  

{

      T = -1;    

      LL = L;

      LL1 = LL[1];   

      var4 = csarv;

      Text_Delete(tx);

}

if T == 1 Then

{

      if H > HH Then

            HH = H;

      Text_Delete(tx);

      if HH >= HH1-0.5 and HH <= HH1+0.5

     and var4>= lowest(L,500)+9 and var4 >= highest(H,250)-1 Then   

      {

      tx = Text_New(sDate,sTime,HH+1.5,"■");

      Text_SetStyle(tx,1,2);

      Text_SetColor(tx,Cyan);

      Text_SetSize(tx,45);      

      }  

}

if T == -1 Then

{

      if L < LL Then

            LL = L;

      Text_Delete(tx);

      if LL <= LL1+0.5 and LL >= LL1-0.5

     and var1<= highest(H,500)-9 and var1<= lowest(L,250)+1 Then  

      {

      tx = Text_New(sDate,sTime,LL-1.5,"■");

      Text_SetStyle(tx,1,2);

      Text_SetColor(tx,Lime);

      Text_SetSize(tx,45);      

      }

}



input : MaPeriod(2),MaPeriod2(1);

var : maOpen(0),maClose(0),maLow(0),maHigh(0);

var : haOpen(0),haClose(0),haLow(0),haHigh(0);

var : ExtMapBuffer1(0),ExtMapBuffer2(0),ExtMapBuffer3(0),ExtMapBuffer4(0);

var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer7(0),ExtMapBuffer8(0);

var : r(0),g(0),b(0), TL(0),t(0),tx(0);

var : HH(0),LL(0),HH1(0),LL1(0),HH2(0),LL2(0);

var : tx1(0),tx2(0);

if Index == 0 Then

{

maOpen=Open;

maClose=Close;

maLow=Low;

maHigh=High;

}

Else

{

maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod;

maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod;

maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod;

maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod;

haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2;

haClose=(maOpen+maHigh+maLow+maClose)/4;

haHigh=Max(maHigh, Max(haOpen, haClose));

haLow=Min(maLow, Min(haOpen, haClose));

if (haOpen<haClose) then

{

r=255;

g=10;

b=0;

ExtMapBuffer7=haLow;

ExtMapBuffer8=haHigh;

t = 1;

}

else

{

r=0;

g=191;

b=255;

ExtMapBuffer7=haHigh;

ExtMapBuffer8=haLow;

t = -1;

}

ExtMapBuffer5=haOpen;

ExtMapBuffer6=haClose;

ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2);

ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2);

ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2);

ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2);

}

PlotPaintBar(ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer3,ExtMapBuffer4,"강조",Rgb(r,g,b));

if T == 1 Then

{

if T != T[1] Then

{

HH = haHigh;

HH1 = HH[1];

HH2 = HH1[1];

Text_Delete(tx2);

Condition1 = False;

if Condition1 == False and HH1 > 0 and max(HH,HH1) <= min(HH, HH1)+0.5 Then

{

Condition1 = true;

tx1 = Text_New(sDate,sTime,HH,"■");

Text_SetStyle(tx1,2,1);

Text_SetColor(tx1,Red);

Text_SetSize(tx1,15);

}

}

Else

{

if haHigh > HH Then

{

HH = haHigh;

if HH1 > 0 and max(HH,HH1) <= min(HH, HH1)+0.5 Then

{

if Condition1 == False Then

{

Condition1 = true;

tx1 = Text_New(sDate,sTime,HH,"■");

Text_SetStyle(tx1,2,1);

Text_SetColor(tx1,Magenta);

Text_SetSize(tx1,15);

}

Else

{

Text_SetLocation(tx1,sDate,sTime,HH);

}

}

Else

{

if Condition1 == true Then

{

Text_Delete(tx1);

}

}

}

}

}

if T == -1 Then

{

if T != T[1] Then

{

LL = haLow;

LL1 = LL[1];

LL2 = LL1[1];


Text_Delete(tx1);

Condition2 = False;

if Condition2 == False and LL1 > 0 and max(LL,LL1) <= min(LL, LL1)+0.5 Then

{

Condition2 = true;

tx2 = Text_New(sDate,sTime,LL,"■");

Text_SetStyle(tx2,2,0);

Text_SetColor(tx2,Cyan);

Text_SetSize(tx2,15);

}

}

Else

{

if haLow < LL Then

{

LL = haLow;

if LL1 > 0 and max(LL,LL1) <= min(LL, LL1)+0.5 Then

{

if Condition2 == False Then

{

Condition2 = true;

tx2 = Text_New(sDate,sTime,LL,"■");

Text_SetStyle(tx2,2,2);

Text_SetColor(tx2,Cyan);

Text_SetSize(tx2,15);

}

Else

{

Text_SetLocation(tx2,sDate,sTime,LL);

}

}

Else

{

if Condition2 == true Then

{

Text_Delete(tx2);

}

}

}

}

}


강조
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-09-09 11:14:54

안녕하세요 예스스탁입니다. input : MaPeriod(2),MaPeriod2(1); var : maOpen(0),maClose(0),maLow(0),maHigh(0); var : haOpen(0),haClose(0),haLow(0),haHigh(0); var : ExtMapBuffer1(0),ExtMapBuffer2(0),ExtMapBuffer3(0),ExtMapBuffer4(0); var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer7(0),ExtMapBuffer8(0); var : r(0),g(0),b(0), TL(0),t(0),tx(0); var : HH(0),LL(0),HH1(0),LL1(0),HH2(0),LL2(0); var : tx1(0); if Index == 0 Then { maOpen=Open; maClose=Close; maLow=Low; maHigh=High; } Else { maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod; maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod; maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod; maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod; haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2; haClose=(maOpen+maHigh+maLow+maClose)/4; haHigh=Max(maHigh, Max(haOpen, haClose)); haLow=Min(maLow, Min(haOpen, haClose)); if (haOpen<haClose) then { r=255; g=10; b=0; ExtMapBuffer7=haLow; ExtMapBuffer8=haHigh; t = 1; } else { r=0; g=191; b=255; ExtMapBuffer7=haHigh; ExtMapBuffer8=haLow; t = -1; } ExtMapBuffer5=haOpen; ExtMapBuffer6=haClose; ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2); ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2); ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2); ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2); } PlotPaintBar(ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer3,ExtMapBuffer4,"강조",Rgb(r,g,b)); if T == 1 Then { if T != T[1] Then { HH = haHigh; HH1 = HH[1]; HH2 = HH1[1]; if LL2 > 0 and max(LL,LL1,LL2) <= min(LL, LL1,LL2)+0.8 and haclose < highest(hahigh,200)-9 and haclose < lowest(halow,100)+2 Then { tx = Text_New(sDate,sTime,L-1,"■"); Text_SetStyle(tx,2,2); Text_SetColor(tx,Black); Text_SetSize(tx,25); } if LL1 > 0 and max(LL,LL1) <= min(LL, LL1)+0.5 and haclose < highest(hahigh,200)-9 and haclose < lowest(halow,100)+2 Then { tx = Text_New(sDate,sTime,L-1,"●"); Text_SetStyle(tx,2,2); Text_SetColor(tx,Red); Text_SetSize(tx,15); } } Else { if haHigh > HH Then { HH = haHigh; } } Text_Delete(tx1); if HH1 > 0 and max(HH,HH1) <= min(HH, HH1)+0.5 Then { tx1 = Text_New(sDate,sTime,HH,"■"); Text_SetStyle(tx1,2,1); Text_SetColor(tx1,Red); Text_SetSize(tx1,15); } } if T == -1 Then { if T != T[1] Then { LL = haLow; LL1 = LL[1]; LL2 = LL1[1]; if HH2 > 0 and max(HH,HH1,HH2) <= min(HH, HH1,HH2)+0.8 and haclose > lowest(halow,200)+9 and haclose > highest(hahigh,100)-2 Then { tx = Text_New(sDate,sTime,H+1,"■"); Text_SetStyle(tx,2,2); Text_SetColor(tx,Red); Text_SetSize(tx,25); } if HH1 > 0 and max(HH,HH1) <= min(HH, HH1)+0.5 and haclose > lowest(halow,200)+9 and haclose > highest(hahigh,100)-2 Then { tx = Text_New(sDate,sTime,H+1,"●"); Text_SetStyle(tx,2,2); Text_SetColor(tx,Blue); Text_SetSize(tx,15); } } Else { if haLow < LL Then { LL = haLow; } } Text_Delete(tx1); if LL1 > 0 and max(LL,LL1) <= min(LL, LL1)+0.5 Then { tx1 = Text_New(sDate,sTime,LL,"■"); Text_SetStyle(tx1,2,0); Text_SetColor(tx1,Cyan); Text_SetSize(tx1,15); } } 즐거운 하루되세요