예스스탁
예스스탁 답변
2020-01-03 17:11:33
안녕하세요
예스스탁입니다.
1번식은 최고가/최저가 갱신구간에서 소리가 계속 출력되게 되어 있어 수정했습니다.
2번식은 추세선이 새로 그어지면 다음봉까지만 소리가 출력되는 식입니다.
1
input : af(0.02), maxAF(0.2);
input : 텍스트출력(1),굵기(0);
var : T(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),day1(0),day2(0),day3(0),day0(0);
var : TL1(0),TL2(0),tx1(0),tx2(0),tx11(0),tx22(0),i1(-1),i2(-1);
Array : HD[20](0),HT[20](0),HH[20](0),LD[20](0),LT[20](0),LL[20](0);
var1 = CSar(af,maxAF);
if bdate != bdate[1] Then
{
day0 = sdate;
day1 = day0[1];
#day2 = day1[1];
#day3 = day2[1];
}
if crossup(c,var1) Then
{
T = 1;
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
for cnt = 1 to 19
{
HD[cnt] = HD[cnt-1][1];
HT[cnt] = HT[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
}
if LL[0] > 0 Then
{
if 텍스트출력 == 1 then
{
Tx11 = Text_New(HD[1],HT[1],HH[1],NumToStr((HH[1]-LL[1])/PriceScale,0)+NewLine+NumToStr(HH[1],2));
Text_SetStyle(tx11,2,1);
Text_SetColor(tx11,BLACK);
Text_Delete(tx1);
Tx1 = Text_New(HD[0],HT[0],HH[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(HH[0],2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
Condition1 = false;
value1 = 0;
for cnt = 1 to 19
{
if value1 == 0 and abs(HH[0]-HH[cnt]) <= PriceScale*3 and HD[cnt] >= day3 Then
{
value1 = cnt;
}
}
if value1 > 0 then
{
if Condition1 == true Then
TL_Delete(TL1);
TL1 = TL_New(HD[value1],HT[value1],HH[value1],HD[0],HT[0],HH[0]);
TL_SetColor(tl1,BLUE);
TL_SetSize(tl1,굵기);
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
Condition1 = true;
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
for cnt = 1 to 19
{
LD[cnt] = LD[cnt-1][1];
LT[cnt] = LT[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
if HH[0] > 0 Then
{
if 텍스트출력 == 1 then
{
Tx22 = Text_New(LD[1],LT[1],LL[1],NumToStr((HH[1]-LL[1])/PriceScale,0)+NewLine+NumToStr(LL[1],2));
Text_SetStyle(tx22,2,0);
Text_SetColor(tx22,RED);
Text_Delete(tx2);
Tx2 = Text_New(LD[0],LT[0],LL[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(LL[0],2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,MAGENTA);
}
}
Condition2 = false;
value2 = 0;
for cnt = 1 to 19
{
if value2 == 0 and abs(LL[0]-LL[cnt]) <= PriceScale*3 and LD[cnt] >= day3 Then
{
value2 = cnt;
}
}
if value2 > 0 then
{
if Condition2 == true Then
TL_Delete(TL2);
TL2 = TL_New(LD[value2],LT[value2],LL[value2],LD[0],LT[0],LL[0]);
TL_SetColor(tl2,MAGENTA);
TL_SetSize(tl2,굵기);
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
Condition2 = true;
}
}
if T == 1 and T[1] == 1 then
{
if H > HH[0] Then
{
if Condition1 == true Then
TL_Delete(TL1);
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx1);
Tx1 = Text_New(HD[0],HT[0],HH[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(HH[0],2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
value1 = 0;
for cnt = 1 to 19
{
if value1 == 0 and abs(HH[0]-HH[cnt]) <= PriceScale*3 and HD[cnt] >= day3 Then
{
value1 = cnt;
}
}
if value1 > 0 then
{
if Condition1 == true Then
TL_Delete(TL1);
TL1 = TL_New(HD[value1],HT[value1],HH[value1],HD[0],HT[0],HH[0]);
TL_SetColor(tl1,BLUE);
TL_SetSize(tl1,굵기);
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
Condition1 = true;
}
}
}
if T == -1 and T[1] == -1 then
{
if L < LL[0] Then
{
if Condition2 == true Then
TL_Delete(TL2);
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx2);
Tx2 = Text_New(LD[0],LT[0],LL[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(LL[0],2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
value2 = 0;
for cnt = 1 to 19
{
if value2 == 0 and abs(LL[0]-LL[cnt]) <= PriceScale*3 and LD[cnt] >= day3 Then
{
value2 = cnt;
}
}
if value2 > 0 then
{
if Condition2 == true Then
TL_Delete(TL2);
TL2 = TL_New(LD[value2],LT[value2],LL[value2],LD[0],LT[0],LL[0]);
TL_SetColor(tl2,MAGENTA);
TL_SetSize(tl2,굵기);
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
Condition2 = true;
}
}
}
2
input : af(0.02), maxAF(0.2);
input : 텍스트출력(1),굵기(0);
var : T(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),day1(0),day2(0),day3(0),day0(0);
var : TL1(0),TL2(0),tx1(0),tx2(0),tx11(0),tx22(0),i1(-1),i2(-1);
Array : HD[20](0),HT[20](0),HH[20](0),LD[20](0),LT[20](0),LL[20](0);
var1 = CSar(af,maxAF);
if bdate != bdate[1] Then
{
day0 = sdate;
day1 = day0[1];
#day2 = day1[1];
#day3 = day2[1];
}
if crossup(c,var1) Then
{
T = 1;
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
for cnt = 1 to 19
{
HD[cnt] = HD[cnt-1][1];
HT[cnt] = HT[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
}
if LL[0] > 0 Then
{
if 텍스트출력 == 1 then
{
Tx11 = Text_New(HD[1],HT[1],HH[1],NumToStr((HH[1]-LL[1])/PriceScale,0)+NewLine+NumToStr(HH[1],2));
Text_SetStyle(tx11,2,1);
Text_SetColor(tx11,BLACK);
Text_Delete(tx1);
Tx1 = Text_New(HD[0],HT[0],HH[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(HH[0],2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
}
Condition1 = false;
value1 = 0;
for cnt = 1 to 19
{
if value1 == 0 and abs(HH[0]-HH[cnt]) <= PriceScale*3 and HD[cnt] >= day3 Then
{
value1 = cnt;
}
}
if value1 > 0 then
{
if Condition1 == true Then
TL_Delete(TL1);
TL1 = TL_New(HD[value1],HT[value1],HH[value1],HD[0],HT[0],HH[0]);
TL_SetColor(tl1,BLUE);
TL_SetSize(tl1,굵기);
i1 = index;
Condition1 = true;
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
for cnt = 1 to 19
{
LD[cnt] = LD[cnt-1][1];
LT[cnt] = LT[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
if HH[0] > 0 Then
{
if 텍스트출력 == 1 then
{
Tx22 = Text_New(LD[1],LT[1],LL[1],NumToStr((HH[1]-LL[1])/PriceScale,0)+NewLine+NumToStr(LL[1],2));
Text_SetStyle(tx22,2,0);
Text_SetColor(tx22,RED);
Text_Delete(tx2);
Tx2 = Text_New(LD[0],LT[0],LL[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(LL[0],2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,MAGENTA);
}
}
Condition2 = false;
value2 = 0;
for cnt = 1 to 19
{
if value2 == 0 and abs(LL[0]-LL[cnt]) <= PriceScale*3 and LD[cnt] >= day3 Then
{
value2 = cnt;
}
}
if value2 > 0 then
{
if Condition2 == true Then
TL_Delete(TL2);
TL2 = TL_New(LD[value2],LT[value2],LL[value2],LD[0],LT[0],LL[0]);
TL_SetColor(tl2,MAGENTA);
TL_SetSize(tl2,굵기);
i2 = index;
Condition2 = true;
}
}
if T == 1 and T[1] == 1 then
{
if H > HH[0] Then
{
if Condition1 == true Then
TL_Delete(TL1);
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx1);
Tx1 = Text_New(HD[0],HT[0],HH[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(HH[0],2));
Text_SetStyle(tx1,2,1);
Text_SetColor(tx1,BLACK);
}
value1 = 0;
for cnt = 1 to 19
{
if value1 == 0 and abs(HH[0]-HH[cnt]) <= PriceScale*3 and HD[cnt] >= day3 Then
{
value1 = cnt;
}
}
if value1 > 0 then
{
if Condition1 == true Then
TL_Delete(TL1);
TL1 = TL_New(HD[value1],HT[value1],HH[value1],HD[0],HT[0],HH[0]);
TL_SetColor(tl1,BLUE);
TL_SetSize(tl1,굵기);
i1 = index;
Condition1 = true;
}
}
}
if T == -1 and T[1] == -1 then
{
if L < LL[0] Then
{
if Condition2 == true Then
TL_Delete(TL2);
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
if 텍스트출력 == 1 then
{
Text_Delete(tx2);
Tx2 = Text_New(LD[0],LT[0],LL[0],NumToStr((HH[0]-LL[0])/PriceScale,0)+NewLine+NumToStr(LL[0],2));
Text_SetStyle(tx2,2,0);
Text_SetColor(tx2,RED);
}
value2 = 0;
for cnt = 1 to 19
{
if value2 == 0 and abs(LL[0]-LL[cnt]) <= PriceScale*3 and LD[cnt] >= day3 Then
{
value2 = cnt;
}
}
if value2 > 0 then
{
if Condition2 == true Then
TL_Delete(TL2);
TL2 = TL_New(LD[value2],LT[value2],LL[value2],LD[0],LT[0],LL[0]);
TL_SetColor(tl2,MAGENTA);
TL_SetSize(tl2,굵기);
i2 = index;
Condition2 = true;
}
}
}
if i1 > 0 and index >= i1 and index <= i1+1 Then
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
if i2 > 0 and index >= i2 and index <= i2+1 Then
PlaySound("C:₩예스트레이더₩data₩Sound₩1point.wav");
즐거운 하루되세요
> 골든키 님이 쓴 글입니다.
> 제목 : 수식부탁입니다
> #65486 도움부탁드립니다.