커뮤니티
소리발생
2017-06-01 12:05:54
136
글번호 110032
안녕하세요
아래의 수식을 사용하고 있는데 첨부된 파일의 그림처럼 색상이 변하는곳에서 소리를 발생시키고 싶습니다.
즉 파란색에서 빨간색으로 비뀔때 3초동안 소리를 발생시키고
빨간색에서 파란색으로 바뀔때 3초동안 소리를 발생시키길 원합니다.
input : Period1(5),Period2(20),Period3(60),Length1(5),Length2(20),Length3(60);
var : StMomentum1(0),StMomentum2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
value1 = 1;
if StMomentum1 < StMomentum1[1] Then
value1 = -1;
if value1 == 1 Then
plot1(var1,"기울기",RED);
else
plot1(var1,"기울기",BLUE);
if StMomentum2 > StMomentum2[1] Then
value1 = 1;
if StMomentum2 < StMomentum2[1] Then
value1 = -1;
if value1 == 1 Then
plot2(var1,"기울기",RED);
else
plot2(var1,"기울기",BLUE);
plot1(StMomentum1);
plot2(StMomentum2);
- 1. 110574_스톡.jpg (0.03 MB)
답변 1
예스스탁 예스스탁 답변
2017-06-01 13:54:23
안녕하세요
예스스탁입니다.
소리출력함수는 사용자분이 지정한 경로의 wav파일이 구동됩니다.
아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다.
원하시는 wav파일의 경로와 이름을 지정하시기 바랍니다.
게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로
₩는 다시 타이핑하시기 바랍니다.
input : Period1(5),Period2(20),Period3(60),Length1(5),Length2(20),Length3(60);
var : StMomentum1(0),StMomentum2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
value1 = 1;
if StMomentum1 < StMomentum1[1] Then
value1 = -1;
if value1 == 1 Then
plot1(StMomentum1,"기울기",RED);
else
plot1(StMomentum1,"기울기",BLUE);
if StMomentum2 > StMomentum2[1] Then
value2 = 1;
if StMomentum2 < StMomentum2[1] Then
value2 = -1;
if value2 == 1 Then
plot2(StMomentum2,"기울기",RED);
else
plot2(StMomentum2,"기울기",BLUE);
if value1 != value1[1] Then
PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");
if value2 != value2[1] Then
PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");
즐거운 하루되세요
> 추세승리 님이 쓴 글입니다.
> 제목 : 소리발생
> 안녕하세요
아래의 수식을 사용하고 있는데 첨부된 파일의 그림처럼 색상이 변하는곳에서 소리를 발생시키고 싶습니다.
즉 파란색에서 빨간색으로 비뀔때 3초동안 소리를 발생시키고
빨간색에서 파란색으로 바뀔때 3초동안 소리를 발생시키길 원합니다.
input : Period1(5),Period2(20),Period3(60),Length1(5),Length2(20),Length3(60);
var : StMomentum1(0),StMomentum2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
value1 = 1;
if StMomentum1 < StMomentum1[1] Then
value1 = -1;
if value1 == 1 Then
plot1(var1,"기울기",RED);
else
plot1(var1,"기울기",BLUE);
if StMomentum2 > StMomentum2[1] Then
value1 = 1;
if StMomentum2 < StMomentum2[1] Then
value1 = -1;
if value1 == 1 Then
plot2(var1,"기울기",RED);
else
plot2(var1,"기울기",BLUE);
plot1(StMomentum1);
plot2(StMomentum2);