커뮤니티

문의드립니다

프로필 이미지
매일
2017-01-29 15:47:52
152
글번호 106344
답변완료
안녕하세요 아래지표식에서 추세선막대기가 형성되는순간 사운드가 발생하도록 사운드기능을추가해주세요 추세선확정과상관없이 무조건 추세선막대기가 새롭게 형성될때(그려질때) 마다 사운드가발생하면됩니다 . 감사합니다 Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2], sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,4); TL_SetColor(TL1,GREEN); Plot1(Highest(H,length)); Plot2(Lowest(L,length));
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-01-31 11:48:58

안녕하세요 예스스탁입니다. 소리출력함수는 사용자분이 지정한 경로의 wav파일이 구동됩니다. 아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다. 원하시는 wav파일의 경로와 이름을 지정하시기 바랍니다. 게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로 ₩는 다시 타이핑하시기 바랍니다. Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then{ TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2], sDate[barArr[1]],sTime[barArr[1]],valArr[1]); PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");//소리출력 } Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,4); TL_SetColor(TL1,GREEN); Plot1(Highest(H,length)); Plot2(Lowest(L,length)); 즐거운 하루되세요 > 매일 님이 쓴 글입니다. > 제목 : 문의드립니다 > 안녕하세요 아래지표식에서 추세선막대기가 형성되는순간 사운드가 발생하도록 사운드기능을추가해주세요 추세선확정과상관없이 무조건 추세선막대기가 새롭게 형성될때(그려질때) 마다 사운드가발생하면됩니다 . 감사합니다 Input:length(12); Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,length) == H and lastHiVal <> H; Condition2 = Lowest(L,length) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; turnPntBit = ""; If Condition1 and Condition2 Then { If Max(valArr[1],valArr[2]) < H and Min(valArr[1],valArr[2]) > L Then turnPntBit = "HiLo"; Else If Max(valArr[1],valArr[2]) < H Then turnPntBit = "Hi"; Else If Min(valArr[1],valArr[2]) > L Then turnPntBit = "Lo"; } Else If Condition1 Then turnPntBit = "Hi"; Else If Condition2 Then turnPntBit = "Lo"; If turnPntBit <> "" Then { If turnPntBit == "HiLo" Then { valArr[1] = IFF(turnPntArr[1] == "Hi",H,L); barArr[1] = 0; TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); If turnPntArr[1] == "Hi" Then turnPntBit = "Lo"; Else turnPntBit = "Hi"; } If turnPntBit <> turnPntArr[1] Then { for j = 8 downto 1 { valArr[j+1] = valArr[j]; barArr[j+1] = barArr[j]; turnPntArr[j+1] = turnPntArr[j]; } } If turnPntBit <> turnPntArr[1] or (turnPntBit == turnPntArr[1] and ((turnPntBit == "Hi" and valArr[1] < H) or (turnPntBit == "Lo" and valArr[1] > L))) Then { valArr[1] = IFF(turnPntBit == "Hi",H,L); barArr[1] = 0; turnPntArr[1] = turnPntBit; If turnPntArr[1][1] <> turnPntArr[1][0] Then TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2], sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,4); TL_SetColor(TL1,GREEN); Plot1(Highest(H,length)); Plot2(Lowest(L,length));