커뮤니티

다시 부탁드립니다! 죄송

프로필 이미지
그리금강산
2016-07-15 11:54:19
139
글번호 100099
답변완료
지그재그 지표; 선물;변수,전환 비율(5),기준값 교차,손절매 10틱,당일 청산,수량 10개,2분 챠트 매수;기존 매도 전부 청산과 동시에 매수 매도;기존 매수 전부 청산과 동시에 매도 입니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-07-15 16:42:24

안녕하세요 예스스탁입니다. 지그재그 수식은 아래 내용 참고하시기 바랍니다. 저희 프로그램 사용자 중에 수식지왕이라는 분이 작성하신 내용입니다. 아래 내용 참고하셔서 수정보완하시기 바랍니다. Input:chngRate(5),수량(10),손절매틱수(10); 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 = Min(valArr[1],valArr[2]) * (1 + (chngRate/100)) < H and lastHiVal < H; Condition2 = Max(valArr[1],valArr[2]) * (1 - (chngRate/100)) > L and (lastLoVal > L || lastLoVal == 0); If Condition1 Then { lastHiVal = H; lastLoVal = 0; } If Condition2 Then { lastLoVal = L; lastHiVal = 0; } 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]); if turnPntArr[1][0]=="Hi" Then{ buy("b",OnClose,def,수량); } if turnPntArr[1][0] =="Lo" Then{ sell("s",OnClose,def,수량); } } Else TL_SetEnd(TL1,sDate[barArr[1]],sTime[barArr[1]],valArr[1]); } } TL_SetSize(TL1,1); TL_SetColor(TL1,black); SetStopProfittarget(PriceScale*손절매틱수,PointStop); 즐거운 하루되세요 > 그리금강산 님이 쓴 글입니다. > 제목 : 다시 부탁드립니다! 죄송 > 지그재그 지표; 선물;변수,전환 비율(5),기준값 교차,손절매 10틱,당일 청산,수량 10개,2분 챠트 매수;기존 매도 전부 청산과 동시에 매수 매도;기존 매수 전부 청산과 동시에 매도 입니다.