커뮤니티

부탁드립니다.

프로필 이미지
매일상승
2015-07-17 09:04:09
104
글번호 88570
답변완료
적용시 라인이 출력되지 않습니다. Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),tx(0),T(0),trnd(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,52) == H and lastHiVal <> H; Condition2 = Lowest(L,52) == 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{ Tx = Text_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],NumToStr(valArr[2],2)); Text_SetStyle(tx,2,2); 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[1],3); TL_SetColor(TL1[1],RGB(20,255,255)); if turnPntArr[1][0] == "Hi" Then trnd = 1; if turnPntArr[1][0] == "Lo" Then trnd = -1; if Trnd == -1 and Trnd[1] == -1 and L == TL_GetValue(TL1,sdate,stime) and L < L[1] Then PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); if Trnd == 1 and Trnd[1] == 1 and H == TL_GetValue(TL1,sdate,stime) and H > H[1] Then PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-07-17 11:22:27

안녕하세요 예스스탁입니다. 첨부된 그림과 같이 라인 표시되고 있습니다. 추세선은 겹치면 보이지 않습니다. 동일한 내용의 추세선을 긋는 식이 2개이상 차트에 그려지면 보이지가 않습니다. 즉 같은 내용을 그리는 추세선식은 지표나 시스템 불문하고 하나만 적용하셔야 하므로 처리하실 내용이 있으면 한쪽으로만 처리하고 보셔야 합니다. 즐거운 하루되세요 > 매일상승 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 적용시 라인이 출력되지 않습니다. Var:j(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),tx(0),T(0),trnd(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For j = 0 To 9 { barArr[j] = barArr[j] + 1; } Condition1 = Highest(H,52) == H and lastHiVal <> H; Condition2 = Lowest(L,52) == 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{ Tx = Text_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],NumToStr(valArr[2],2)); Text_SetStyle(tx,2,2); 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[1],3); TL_SetColor(TL1[1],RGB(20,255,255)); if turnPntArr[1][0] == "Hi" Then trnd = 1; if turnPntArr[1][0] == "Lo" Then trnd = -1; if Trnd == -1 and Trnd[1] == -1 and L == TL_GetValue(TL1,sdate,stime) and L < L[1] Then PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); if Trnd == 1 and Trnd[1] == 1 and H == TL_GetValue(TL1,sdate,stime) and H > H[1] Then PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");