커뮤니티

수식문의드립니다...

프로필 이미지
베비슬립
2017-11-03 03:57:50
158
글번호 113866
답변완료
아래수식은 파동선 지표식인데요 이 파동선 고점 -30틱을 crossdown하면 매도 파동선 저점 +30틱을 crossup하면 매수하는 시스템식 부탁드립니다 미리감사드립니다. input : 텍스트소수점자리수(1); Var:jjjjj(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),Tx(0),trnd(0),tx22(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For jjjjj = 0 To 9 { barArr[jjjjj] = barArr[jjjjj] + 1; } Condition1 = Highest(H,26) == H and lastHiVal <> H; Condition2 = Lowest(L,26) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; // 전환점구분 null값으로 초기화; 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 jjjjj = 8 downto 1 { valArr[jjjjj+1] = valArr[jjjjj]; barArr[jjjjj+1] = barArr[jjjjj]; turnPntArr[jjjjj+1] = turnPntArr[jjjjj]; } } 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],텍스트소수점자리수)); Text_SetStyle(tx,0,2); TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } if turnPntArr[1][0] == "Lo" Then trnd = -1; if turnPntArr[1][0] == "hi" Then trnd = 1; } } TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Text_Delete(tx22); tx22 = Text_New(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],텍스트소수점자리수)); TL_SetSize(TL1[1],0); TL_SetColor(TL1[1],BLACK);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-11-03 11:05:21

안녕하세요 예스스탁입니다. input : 텍스트소수점자리수(1); Var:jjjjj(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),Tx(0),trnd(0),tx22(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For jjjjj = 0 To 9 { barArr[jjjjj] = barArr[jjjjj] + 1; } Condition1 = Highest(H,26) == H and lastHiVal <> H; Condition2 = Lowest(L,26) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; // 전환점구분 null값으로 초기화; 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 jjjjj = 8 downto 1 { valArr[jjjjj+1] = valArr[jjjjj]; barArr[jjjjj+1] = barArr[jjjjj]; turnPntArr[jjjjj+1] = turnPntArr[jjjjj]; } } 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],텍스트소수점자리수)); Text_SetStyle(tx,0,2); TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } if turnPntArr[1][0] == "Lo" Then trnd = -1; if turnPntArr[1][0] == "Hi" Then trnd = 1; } } TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Text_Delete(tx22); tx22 = Text_New(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],텍스트소수점자리수)); TL_SetSize(TL1[1],0); TL_SetColor(TL1[1],BLACK); if trnd == 1 Then var1 = valArr[1]; if trnd == -1 Then var2 = valArr[1]; if CrossDown(c,var1-PriceScale*30) Then sell(); if CrossUp(c,var2+PriceScale*30) Then buy(); 즐거운 하루되세요 > 베비슬립 님이 쓴 글입니다. > 제목 : 수식문의드립니다... > 아래수식은 파동선 지표식인데요 이 파동선 고점 -30틱을 crossdown하면 매도 파동선 저점 +30틱을 crossup하면 매수하는 시스템식 부탁드립니다 미리감사드립니다. input : 텍스트소수점자리수(1); Var:jjjjj(0),lastHiVal(0),lastLoVal(0),turnPntBit(""),TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),Tx(0),trnd(0),tx22(0); Array:valArr[10](0),barArr[10](0),turnPntArr[10](""); For jjjjj = 0 To 9 { barArr[jjjjj] = barArr[jjjjj] + 1; } Condition1 = Highest(H,26) == H and lastHiVal <> H; Condition2 = Lowest(L,26) == L and lastLoVal <> L; If Condition1 Then lastHiVal = H; If Condition2 Then lastLoVal = L; // 전환점구분 null값으로 초기화; 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 jjjjj = 8 downto 1 { valArr[jjjjj+1] = valArr[jjjjj]; barArr[jjjjj+1] = barArr[jjjjj]; turnPntArr[jjjjj+1] = turnPntArr[jjjjj]; } } 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],텍스트소수점자리수)); Text_SetStyle(tx,0,2); TL1 = TL_New(sDate[barArr[2]],sTime[barArr[2]],valArr[2],sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } if turnPntArr[1][0] == "Lo" Then trnd = -1; if turnPntArr[1][0] == "hi" Then trnd = 1; } } TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); Text_Delete(tx22); tx22 = Text_New(sDate[barArr[1]],sTime[barArr[1]],valArr[1],NumToStr(valArr[1],텍스트소수점자리수)); TL_SetSize(TL1[1],0); TL_SetColor(TL1[1],BLACK);