예스스탁
예스스탁 답변
2023-11-01 14:11:19
안녕하세요
예스스탁입니다.
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);
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 and t != t[1] Then
{
tx = Text_New(sDate,sTime,l,"■");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
}
if t == -1 and t != t[1] Then
{
tx = Text_New(sDate,sTime,g,"■");
Text_SetStyle(tx,2,1);
Text_SetColor(tx,Blue);
}
즐거운 하루되세요
> 고성 님이 쓴 글입니다.
> 제목 : 하이킨아시 전환
> 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);
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;
}
else
{
r=0;
g=191;
b=255;
ExtMapBuffer7=haHigh;
ExtMapBuffer8=haLow;
}
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));
양전환되면 봉 하단에 네모, 음전환되면 봉 상단에 네모 표시, 추가 부탁드립니다.