각 수치에서 3% 오차범위내에서 팝업과 알람이 울려야되는데
수치는 정확하게 맞는데 팝업도 알람도 안 울려서 뭐가 문제인지 모르겠어요.
₩도 다시 입력해봤지만 안 되네요.
다시 한 번 확인 부탁드려요.
1.월고월저기준가
input : 입력일(20211210),Per(3);
var : 기준가(0,Data2),월고(0,Data2),월저(0,Data2);
var : cond1(False,Data2),cond2(False,Data2),cond3(False,Data2);
if data2(sdate == 입력일) Then
기준가 = data2(lowD(0));
if data2(sdate >= 입력일) Then
{
if Data2(월고 == 0 or (월고 > 0 and H > 월고)) Then
월고 = data2(h);
if data2(월저 == 0 or (월저 > 0 and L < 월저)) Then
월저 = data2(l);
}
if 기준가 > 0 Then
Plot1(기준가);
if 월고 > 0 Then
Plot2(월고);
if 월저 > 0 Then
Plot3(월저);
Cond1 = Data2(C<=기준가*(1+Per/100) and C >= 기준가*(1-Per/100));
Cond2 = Data2(C<=월고*(1+Per/100) and C >= 월고*(1-Per/100));
Cond3 = Data2(C<=월저*(1+Per/100) and C >= 월저*(1-Per/100));
if cond1 == true and cond1[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond1 조건충족");
}
if cond2 == true and cond2[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond2 조건충족");
}
if cond3 == true and cond3[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond3 조건충족");
}
2 특정일저가
input : 날짜(20211210),Per1(3);
var : D2L(0,data2),scond1(False,Data2);
if data2(sdate == 날짜) Then
{
D2L = data2(LowD(0));
}
plot1(D2L);
scond1 = Data2(C) <= D2L*(1+Per1/100) and Data2(C) >= D2L*(1-Per1/100);
if scond1 == true and scond1[1] == true Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("scond1 조건충족");
}
답변 2
예스스탁
예스스탁 답변
2021-12-14 10:22:43
안녕하세요
예스스탁입니다.
소리나 팝업창 출력에 문제가 없습니다.
작성하신 수식들은 현재봉에서 3%범위에만 있으면 소리나 경고창이 발생하는 것이 아닙니다.
data2기준으로 한봉전에는 조건이 충족하지 않고 현재봉에서는 조건을 충족해야 합니다.
한봉전에는 3% 범위 밖이었다가 현재봉에서 3% 이내로 들어와야 합니다.
if문에서 한봉전 조건을 삭제해 보시기 바랍니다.
즐거운 하루되세요
> 육각수 님이 쓴 글입니다.
> 제목 : 문의
> 각 수치에서 3% 오차범위내에서 팝업과 알람이 울려야되는데
수치는 정확하게 맞는데 팝업도 알람도 안 울려서 뭐가 문제인지 모르겠어요.
₩도 다시 입력해봤지만 안 되네요.
다시 한 번 확인 부탁드려요.
1.월고월저기준가
input : 입력일(20211210),Per(3);
var : 기준가(0,Data2),월고(0,Data2),월저(0,Data2);
var : cond1(False,Data2),cond2(False,Data2),cond3(False,Data2);
if data2(sdate == 입력일) Then
기준가 = data2(lowD(0));
if data2(sdate >= 입력일) Then
{
if Data2(월고 == 0 or (월고 > 0 and H > 월고)) Then
월고 = data2(h);
if data2(월저 == 0 or (월저 > 0 and L < 월저)) Then
월저 = data2(l);
}
if 기준가 > 0 Then
Plot1(기준가);
if 월고 > 0 Then
Plot2(월고);
if 월저 > 0 Then
Plot3(월저);
Cond1 = Data2(C<=기준가*(1+Per/100) and C >= 기준가*(1-Per/100));
Cond2 = Data2(C<=월고*(1+Per/100) and C >= 월고*(1-Per/100));
Cond3 = Data2(C<=월저*(1+Per/100) and C >= 월저*(1-Per/100));
if cond1 == true and cond1[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond1 조건충족");
}
if cond2 == true and cond2[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond2 조건충족");
}
if cond3 == true and cond3[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond3 조건충족");
}
2 특정일저가
input : 날짜(20211210),Per1(3);
var : D2L(0,data2),scond1(False,Data2);
if data2(sdate == 날짜) Then
{
D2L = data2(LowD(0));
}
plot1(D2L);
scond1 = Data2(C) <= D2L*(1+Per1/100) and Data2(C) >= D2L*(1-Per1/100);
if scond1 == true and scond1[1] == true Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("scond1 조건충족");
}
늘 감사드립니다.
if문에서 한봉전 조건을 삭제해보라시는데 할 줄 몰라요ㅠ.ㅠ
도움 부탁드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의
>
안녕하세요
예스스탁입니다.
소리나 팝업창 출력에 문제가 없습니다.
작성하신 수식들은 현재봉에서 3%범위에만 있으면 소리나 경고창이 발생하는 것이 아닙니다.
data2기준으로 한봉전에는 조건이 충족하지 않고 현재봉에서는 조건을 충족해야 합니다.
한봉전에는 3% 범위 밖이었다가 현재봉에서 3% 이내로 들어와야 합니다.
if문에서 한봉전 조건을 삭제해 보시기 바랍니다.
즐거운 하루되세요
> 육각수 님이 쓴 글입니다.
> 제목 : 문의
> 각 수치에서 3% 오차범위내에서 팝업과 알람이 울려야되는데
수치는 정확하게 맞는데 팝업도 알람도 안 울려서 뭐가 문제인지 모르겠어요.
₩도 다시 입력해봤지만 안 되네요.
다시 한 번 확인 부탁드려요.
1.월고월저기준가
input : 입력일(20211210),Per(3);
var : 기준가(0,Data2),월고(0,Data2),월저(0,Data2);
var : cond1(False,Data2),cond2(False,Data2),cond3(False,Data2);
if data2(sdate == 입력일) Then
기준가 = data2(lowD(0));
if data2(sdate >= 입력일) Then
{
if Data2(월고 == 0 or (월고 > 0 and H > 월고)) Then
월고 = data2(h);
if data2(월저 == 0 or (월저 > 0 and L < 월저)) Then
월저 = data2(l);
}
if 기준가 > 0 Then
Plot1(기준가);
if 월고 > 0 Then
Plot2(월고);
if 월저 > 0 Then
Plot3(월저);
Cond1 = Data2(C<=기준가*(1+Per/100) and C >= 기준가*(1-Per/100));
Cond2 = Data2(C<=월고*(1+Per/100) and C >= 월고*(1-Per/100));
Cond3 = Data2(C<=월저*(1+Per/100) and C >= 월저*(1-Per/100));
if cond1 == true and cond1[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond1 조건충족");
}
if cond2 == true and cond2[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond2 조건충족");
}
if cond3 == true and cond3[1] == False Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("Cond3 조건충족");
}
2 특정일저가
input : 날짜(20211210),Per1(3);
var : D2L(0,data2),scond1(False,Data2);
if data2(sdate == 날짜) Then
{
D2L = data2(LowD(0));
}
plot1(D2L);
scond1 = Data2(C) <= D2L*(1+Per1/100) and Data2(C) >= D2L*(1-Per1/100);
if scond1 == true and scond1[1] == true Then
{
PlaySound("C:₩예스트레이더₩data₩Sound₩accept.wav");
Alert("scond1 조건충족");
}