예스스탁
예스스탁 답변
2020-01-08 09:40:04
안녕하세요
예스스탁입니다.
input : af(0.02), maxAF(0.2),nday(20200102);
input : 텍스트출력(1),굵기(0);
var : T(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0);
var : TL1(0),TL2(0),tx1(0),tx2(0),tx11(0),tx22(0);
Array : HD[20](0),HT[20](0),HH[20](0),LD[20](0),LT[20](0),LL[20](0);
var1 = CSar(af,maxAF);
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;
}
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;
}
if T == 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] >= nday 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:예스트레이더dataSound1point.wav");
Condition1 = true;
}
}
if T == -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] >= nday 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:예스트레이더dataSound1point.wav");
Condition2 = true;
}
}
즐거운 하루되세요
> 골든키 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다
> $,안녕하세요
# 65486 질문에서 날자를 변경 할수있는 식으로 즉,day1,2,3 를 외부변수 처리로
작성할수 있을까요, 도움부탁드립니다.