커뮤니티

시작시간 변경

프로필 이미지
좌오비우오비
2017-12-04 11:20:26
171
글번호 114662
답변완료

첨부 이미지

*조건 : buy만 거래, 3틱봉, 데이트레이딩 장종료 03시18분, 거래 20회max 세팅 고쳐주신 수식에서 시작시간을 09시로 놓으면 당일 총 4번의 거래를 합니다.......................(첨부1 참조) 시작시간을 11시로 놓으면 당일 2번의 거래를 예상하는데 반응이 없습니다..... (첨부2 참조) 살펴주셨으면 합니다 항상 고맙습니다. ************************************************************************ Re : 시작시간 초기화 안녕하세요 예스스탁입니다. input : b1(9),b2(9),X1(9),X2(9),진입눌림(3),진입돌파(1),청산눌림(3),청산돌파(1),거래횟수(20),시작시간(090000) ; var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); if (sdate != sdate[1] and stime >= 시작시간) or (sdate == sdate[1] and stime > 시작시간 and stime[1] < 시작시간) Then{ T1 = TotalTrades; E1 = 0; LL = L; } if stime >= 시작시간 then{ if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C >= LL+PriceScale*B1 and C[1] < LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b2"); } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X1 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx1"); E1 = 0; } } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx2"); E1 = 0; } } } } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 시작시간 초기화 > 아래 수식의 시간조절로는 단순히 시작시간만 변경됩니다. input에서 시간을 입력하면 090000부터 계산은 초기화하고 입력한 시간부터 장시작으로 인식하는 수식으로 변경 바랍니다. 항상 고맙습니다. ************************************ input : b1(9),b2(9),X1(9),X2(9),진입눌림(3),진입돌파(1),청산눌림(3),청산돌파(1),거래횟수(20),시작시간(090000) ; var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); if Bdate != Bdate[1] Then{ T1 = TotalTrades; E1 = 0; } if (Bdate != Bdate[1] and stime >= 시작시간) or (Bdate == Bdate[1] and stime > 시작시간 and stime[1] < 시작시간) Then LL = L; if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 and stime >= 시작시간 Then{ if E1 == 0 and C >= LL+PriceScale*B1 and C[1] < LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b2"); } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X1 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx1"); E1 = 0; } } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx2"); E1 = 0; } } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-12-04 14:32:54

안녕하세요 예스스탁입니다. (sdate == sdate[1] and stime > 시작시간 and stime[1] < 시작시간) 식을 수정했습니다. (sdate == sdate[1] and stime >= 시작시간 and stime[1] < 시작시간) 초기화 식의 등호가 빠져있어 신호가 나오지 않았습니다. input : b1(30),b2(30),X1(30),X2(30),진입눌림(7),진입돌파(5),청산눌림(7),청산돌파(5),거래횟수(20),시작시간(090000) ; var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); if (sdate != sdate[1] and stime >= 시작시간) or (sdate == sdate[1] and stime >= 시작시간 and stime[1] < 시작시간) Then{ T1 = TotalTrades; E1 = 0; LL = L; } if stime >= 시작시간 then{ if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C >= LL+PriceScale*B1 and C[1] < LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b2"); } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X1 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx1"); E1 = 0; } } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx2"); E1 = 0; } } } } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 시작시간 변경 > *조건 : buy만 거래, 3틱봉, 데이트레이딩 장종료 03시18분, 거래 20회max 세팅 고쳐주신 수식에서 시작시간을 09시로 놓으면 당일 총 4번의 거래를 합니다.......................(첨부1 참조) 시작시간을 11시로 놓으면 당일 2번의 거래를 예상하는데 반응이 없습니다..... (첨부2 참조) 살펴주셨으면 합니다 항상 고맙습니다. ************************************************************************ Re : 시작시간 초기화 안녕하세요 예스스탁입니다. input : b1(9),b2(9),X1(9),X2(9),진입눌림(3),진입돌파(1),청산눌림(3),청산돌파(1),거래횟수(20),시작시간(090000) ; var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); if (sdate != sdate[1] and stime >= 시작시간) or (sdate == sdate[1] and stime > 시작시간 and stime[1] < 시작시간) Then{ T1 = TotalTrades; E1 = 0; LL = L; } if stime >= 시작시간 then{ if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C >= LL+PriceScale*B1 and C[1] < LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b2"); } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X1 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx1"); E1 = 0; } } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx2"); E1 = 0; } } } } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 시작시간 초기화 > 아래 수식의 시간조절로는 단순히 시작시간만 변경됩니다. input에서 시간을 입력하면 090000부터 계산은 초기화하고 입력한 시간부터 장시작으로 인식하는 수식으로 변경 바랍니다. 항상 고맙습니다. ************************************ input : b1(9),b2(9),X1(9),X2(9),진입눌림(3),진입돌파(1),청산눌림(3),청산돌파(1),거래횟수(20),시작시간(090000) ; var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0); if Bdate != Bdate[1] Then{ T1 = TotalTrades; E1 = 0; } if (Bdate != Bdate[1] and stime >= 시작시간) or (Bdate == Bdate[1] and stime > 시작시간 and stime[1] < 시작시간) Then LL = L; if L < LL Then LL = L; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 and stime >= 시작시간 Then{ if E1 == 0 and C >= LL+PriceScale*B1 and C[1] < LL+PriceScale*B1 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; LL = L; } if L < LL Then LL = L; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then{ E1 = 1; H1 = H; i1 = index; V1 = LL; //시작점 종가 } if E1 == 1 and index > i1 then{ if H > H1 Then H1 = H; #저가가 시작봉종가보다 클때만 눌림체크 if L >= V1 and L <= H1-PriceScale*진입눌림 Then{ E1 = 2; i1 = index; S1 = H1; } } //시작점 종가보다 낮은 가격이 발생하면 초기화 if E1 >= 1 and L < V1 Then{ E1 = 0; LL = L; } if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파 Then{ buy("b2"); } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X1 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx1"); E1 = 0; } } } if MarketPosition == 1 Then{ if entry >= 1 then{ if CurrentContracts > CurrentContracts[1] Then{ EH = H; E1 = 0; } if H > EH Then{ EH = H; E1 = 0; } if E1 == 0 and C <= EH-PriceScale*X2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 Then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*청산눌림 Then{ E1 = 2; I1 = index; S1 = L1; } } if E1 == 2 and index > i1 and C <= S1-PriceScale*청산돌파 Then{ exitlong("bx2"); E1 = 0; } } }