커뮤니티

소리로 알려주는식 추가하기

프로필 이미지
매버릭
2016-05-13 12:35:03
146
글번호 98033
답변완료
안녕하세요? 아래의 식에 고점이 생기거나 저점이 생길 때 소리로 알려주는 식을 추가하고 싶은데 어느 지점에다 식을 추가해야 될지 모르겠군요. (소리File 위치 : C:₩예스트레이더₩data₩Sound₩emile.wav ) 감사합니다. ================================================================================== Input:length(24); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0), Text1(0),처리구분(""); Array:고점[10,2](0),저점[10,2](0); //가격,위치 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1], sDate[eBar],sTime[eBar],고점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1], NumToStr(고점[1,1],1)); Text_SetStyle(Text1, 2, 1); } } If 처리구분 == "저점처리" Then { lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1], sDate[eBar],sTime[eBar],저점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1], NumToStr(저점[1,1],1)); Text_SetStyle(Text1, 2, 0); } } TL_SetSize(TL1,3); TL_SetColor(TL1,CYAN);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-05-13 21:17:42

안녕하세요 예스스탁입니다. 게시판에서 식 복사하시면 playsound의 경로중 ₩의 폰트가 깨질수 있습니다. 소리파일 경로에서 ₩은 다시 타이핑 하시기 바랍니다. Input:length(24); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0), Text1(0),처리구분(""); Array:고점[10,2](0),저점[10,2](0); //가격,위치 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1], sDate[eBar],sTime[eBar],고점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1], NumToStr(고점[1,1],1)); Text_SetStyle(Text1, 2, 1); } } If 처리구분 == "저점처리" Then { lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1], sDate[eBar],sTime[eBar],저점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1], NumToStr(저점[1,1],1)); Text_SetStyle(Text1, 2, 0); } } TL_SetSize(TL1,3); TL_SetColor(TL1,CYAN); If 처리구분 == "고점처리" Then T = 1; If 처리구분 == "저점처리" Then T = -1; if T == -1 and T[1] != -1 Then{ PlaySound(C:₩예스트레이더₩data₩Sound₩emile.wav); } if T == 1 and T[1] != 1 Then{ PlaySound(C:₩예스트레이더₩data₩Sound₩emile.wav); } 즐거운 하루되세요 > 매버릭 님이 쓴 글입니다. > 제목 : 소리로 알려주는식 추가하기 > 안녕하세요? 아래의 식에 고점이 생기거나 저점이 생길 때 소리로 알려주는 식을 추가하고 싶은데 어느 지점에다 식을 추가해야 될지 모르겠군요. (소리File 위치 : C:₩예스트레이더₩data₩Sound₩emile.wav ) 감사합니다. ================================================================================== Input:length(24); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0), Text1(0),처리구분(""); Array:고점[10,2](0),저점[10,2](0); //가격,위치 처리구분 = ""; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For j = 10 DownTo 2 { 고점[j,1] = 고점[j-1,1]; 고점[j,2] = 고점[j-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1], sDate[eBar],sTime[eBar],고점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1], NumToStr(고점[1,1],1)); Text_SetStyle(Text1, 2, 1); } } If 처리구분 == "저점처리" Then { lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For j = 10 DownTo 2 { 저점[j,1] = 저점[j-1,1]; 저점[j,2] = 저점[j-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1], sDate[eBar],sTime[eBar],저점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1], NumToStr(저점[1,1],1)); Text_SetStyle(Text1, 2, 0); } } TL_SetSize(TL1,3); TL_SetColor(TL1,CYAN);