예스스탁
예스스탁 답변
2022-06-07 14:39:12
안녕하세요
예스스탁입니다.
short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0];
long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0];
기존 매수와 매도는 위 조건으로 발생합니다.
색상 변경이면 haOpen,haClose의 비교로만 발생되어야 합니다.
input : MaPeriod(6),MaPeriod2(2);
var : maOpen(0),maClose(0),maLow(0),maHigh(0);
var : haOpen(0),haClose(0),haLow(0),haHigh(0);
var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer4(0),ExtMapBuffer3(0),ExtMapBuffer2(0),ExtMapBuffer1(0);
var : ExtMapBuffer7(0),ExtMapBuffer8(0);
var : r(0),g(0),b(0),short(False),long(False);
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=0;
g=191;
b=255;
ExtMapBuffer7=haLow;
ExtMapBuffer8=haHigh;
}
else
{
r=255;
g=10;
b=0;
ExtMapBuffer7=haHigh;
ExtMapBuffer8=haLow;
}
ExtMapBuffer5=haOpen;
ExtMapBuffer6=haClose;
ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2);
ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2);
ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2);
ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2);
}
if haOpen<haClose Then
Buy();
Else
Sell();
즐거운 하루되세요
> 고성 님이 쓴 글입니다.
> 제목 : 하이킨 아시 신호 시점
>
input : MaPeriod(6),MaPeriod2(2);
var : maOpen(0),maClose(0),maLow(0),maHigh(0);
var : haOpen(0),haClose(0),haLow(0),haHigh(0);
var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer4(0),ExtMapBuffer3(0),ExtMapBuffer2(0),ExtMapBuffer1(0);
var : ExtMapBuffer7(0),ExtMapBuffer8(0);
var : r(0),g(0),b(0),short(False),long(False);
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=0;
g=191;
b=255;
ExtMapBuffer7=haLow;
ExtMapBuffer8=haHigh;
}
else
{
r=255;
g=10;
b=0;
ExtMapBuffer7=haHigh;
ExtMapBuffer8=haLow;
}
ExtMapBuffer5=haOpen;
ExtMapBuffer6=haClose;
ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2);
ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2);
ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2);
ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2);
}
short = ExtMapBuffer7[1]>ExtMapBuffer8[1] and ExtMapBuffer7[2]<ExtMapBuffer8[2] and ExtMapBuffer7[0]>ExtMapBuffer8[0];
long = ExtMapBuffer7[1]<ExtMapBuffer8[1] and ExtMapBuffer7[2]>ExtMapBuffer8[2] and ExtMapBuffer7[0]<ExtMapBuffer8[0];
if long Then
Buy();
if short Then
Sell();
강조식 색깔이 변한후 두번째 봉에 매수 매도 신호가 오는데, 첫번째 봉에 신호가 오게 부탁드립니다.