커뮤니티

수식어 부탁 드립니다

프로필 이미지
푸른
2021-03-19 08:28:00
842
글번호 147237
답변완료

첨부 이미지

위 그래프의 07시부터 익일 03시까지 피보나치 수열이 61.8% 되돌림에 매도후 0%에 청산하는 수식어를 부탁 드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-03-19 13:36:28

안녕하세요 예스스탁입니다. 1 07시~익일03시까지 최고가와 최저가 계산후 신호는 03시 이후에 발생하는 내용이면 아래와 같습니다 input : T1(070000),T2(030000); var : T(0),hh(0),ll(0); if (sdate != sdate[1] and stime >= T2) or (sdate == sdate[1] and stime >= T2 and stime[1] < T2) Then T = 2; if (sdate != sdate[1] and stime >= T1) or (sdate == sdate[1] and stime >= T1 and stime[1] < T1) Then { T = 1; HH = H; LL = L; } if T == 1 Then { if H > hh Then hh = H; if L < ll Then ll = L; } if T == 2 and hh > 0 and ll > 0 Then { if NextBarOpen < ll+(hh-ll)*0.618 Then Sell("s1",AtLimit,ll+(hh-ll)*0.618); Else Sell("s2",AtStop,ll+(hh-ll)*0.618); if MarketPosition == -1 Then ExitShort("bx",AtLimit,ll[BarsSinceEntry]); } 2 07시~익일03시까지 갱신되는 최고가와 최저가 이용해 해당 시간이내에 신호가 발생하는 내용이면 아래와 같습니다. input : T1(070000),T2(030000); var : T(0),hh(0),ll(0); if sDate != sDate[1] Then SetStopEndofday(T2); if (sdate != sdate[1] and stime >= T2) or (sdate == sdate[1] and stime >= T2 and stime[1] < T2) Then T = 2; if (sdate != sdate[1] and stime >= T1) or (sdate == sdate[1] and stime >= T1 and stime[1] < T1) Then { SetStopEndofday(0); T = 1; HH = H; LL = L; } if T == 1 Then { if H > hh Then hh = H; if L < ll Then ll = L; } if T == 1 and hh > 0 and ll > 0 Then { if NextBarOpen < ll+(hh-ll)*0.618 Then Sell("s1",AtLimit,ll+(hh-ll)*0.618); Else Sell("s2",AtStop,ll+(hh-ll)*0.618); if MarketPosition == -1 Then ExitShort("bx",AtLimit,ll[BarsSinceEntry]); } 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식어 부탁 드립니다 > 위 그래프의 07시부터 익일 03시까지 피보나치 수열이 61.8% 되돌림에 매도후 0%에 청산하는 수식어를 부탁 드립니다