커뮤니티

문의

프로필 이미지
좌오비우오비
2021-02-09 14:53:42
568
글번호 146222
답변완료
아래식은 sell 전용 수식입니다. d1 진입조건은 1회 진입시 적용 d2 진입조건은 2회부터 반복됨 1회 d1 2회 d2 3회 d2 4회 d2 . . . *** 요청사항 d1 진입조건은 1회 진입시 적용 d2 진입조건은 2회 진입시 적용 d3 진입조건은 3회부터 반복됨 1회 d1 2회 d2 3회 d3 4회 d3 5회 d3 . . . d3 진입조건은 d2와 동일하게 해주시면 됩니다. input : d3(40),진입눌림3(10),진입돌파3(10); d2수식을 복사하여 d3로 변경해보았는데 d3가 작동 되지 않더군요. 부탁드립니다. **************************************************************************************** input : 진입시간(090000),진입제한시간(151500); input : 거래횟수(20); input : d1(40),진입눌림1(10),진입돌파1(10); input : d2(40),진입눌림2(10),진입돌파2(10); var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); var : Tcond(false); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; HH = H; } if stime >= 진입시간 then{ if H > HH Then HH = H; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C <= HH-PriceScale*d1 and C[1] < HH-PriceScale*d1 Then{ E1 = 1; L1 = L; i1 = index; V1 = HH; //시작점 종가 } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; #고가가 시작봉종가보다 작을 때만 눌림체크 if H <= V1 and H >= L1+PriceScale*진입눌림1 Then{ E1 = 2; i1 = index; S1 = L1; } } //시작점 종가보다 높은 가격이 발생하면 초기화 if E1 >= 1 and H > V1 Then{ E1 = 0; HH = H; } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파1 and Tcond == true Then{ sell("d1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; HH = H; } if H > HH Then HH = H; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C <= HH-PriceScale*d2 and C[1] < HH-PriceScale*d2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림2 Then{ E1 = 2; i1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파2 and Tcond == true Then{ sell("d2"); E1 = 0; } } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-02-10 10:40:47

안녕하세요 예스스탁입니다. input : 진입시간(090000),진입제한시간(151500); input : 거래횟수(20); input : d1(40),진입눌림1(10),진입돌파1(10); input : d2(40),진입눌림2(10),진입돌파2(10); input : d3(40),진입눌림3(10),진입돌파3(10); var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); var : Tcond(false); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; HH = H; } if stime >= 진입시간 then { if H > HH Then HH = H; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then { if E1 == 0 and C <= HH-PriceScale*d1 and C[1] < HH-PriceScale*d1 Then { E1 = 1; L1 = L; i1 = index; V1 = HH; //시작점 종가 } if E1 == 1 and index > i1 then { if L < L1 Then L1 = L; #고가가 시작봉종가보다 작을 때만 눌림체크 if H <= V1 and H >= L1+PriceScale*진입눌림1 Then { E1 = 2; i1 = index; S1 = L1; } } //시작점 종가보다 높은 가격이 발생하면 초기화 if E1 >= 1 and H > V1 Then { E1 = 0; HH = H; } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파1 and Tcond == true Then { sell("d1"); } } if TotalTrades > TotalTrades[1] Then { E1 = 0; HH = H; } if H > HH Then HH = H; if MarketPosition == 0 and entry == 1 and entry < 거래횟수 Then { if E1 == 0 and C <= HH-PriceScale*d2 and C[1] < HH-PriceScale*d2 Then { E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then { if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림2 Then { E1 = 2; i1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파2 and Tcond == true Then { sell("d2"); E1 = 0; } } if MarketPosition == 0 and entry >= 2 and entry < 거래횟수 Then { if E1 == 0 and C <= HH-PriceScale*d3 and C[1] < HH-PriceScale*d3 Then { E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then { if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림3 Then { E1 = 2; i1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파3 and Tcond == true Then { sell("d3"); E1 = 0; } } } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 문의 > 아래식은 sell 전용 수식입니다. d1 진입조건은 1회 진입시 적용 d2 진입조건은 2회부터 반복됨 1회 d1 2회 d2 3회 d2 4회 d2 . . . *** 요청사항 d1 진입조건은 1회 진입시 적용 d2 진입조건은 2회 진입시 적용 d3 진입조건은 3회부터 반복됨 1회 d1 2회 d2 3회 d3 4회 d3 5회 d3 . . . d3 진입조건은 d2와 동일하게 해주시면 됩니다. input : d3(40),진입눌림3(10),진입돌파3(10); d2수식을 복사하여 d3로 변경해보았는데 d3가 작동 되지 않더군요. 부탁드립니다. **************************************************************************************** input : 진입시간(090000),진입제한시간(151500); input : 거래횟수(20); input : d1(40),진입눌림1(10),진입돌파1(10); input : d2(40),진입눌림2(10),진입돌파2(10); var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); var : Tcond(false); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; HH = H; } if stime >= 진입시간 then{ if H > HH Then HH = H; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C <= HH-PriceScale*d1 and C[1] < HH-PriceScale*d1 Then{ E1 = 1; L1 = L; i1 = index; V1 = HH; //시작점 종가 } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; #고가가 시작봉종가보다 작을 때만 눌림체크 if H <= V1 and H >= L1+PriceScale*진입눌림1 Then{ E1 = 2; i1 = index; S1 = L1; } } //시작점 종가보다 높은 가격이 발생하면 초기화 if E1 >= 1 and H > V1 Then{ E1 = 0; HH = H; } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파1 and Tcond == true Then{ sell("d1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; HH = H; } if H > HH Then HH = H; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C <= HH-PriceScale*d2 and C[1] < HH-PriceScale*d2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림2 Then{ E1 = 2; i1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파2 and Tcond == true Then{ sell("d2"); E1 = 0; } } }