커뮤니티

수식 문의

프로필 이미지
softtoug
2016-08-26 11:32:22
109
글번호 101396
답변완료
안녕하세요 하기 수식에 추가로 더하고 싶어서 문의드립니다. input : CCIP(10),RSIP(10),sto1(10),sto2(5),P1(5),P2(20); input : loss(50),Profit11(20),Profit12(30),Profit2(50); var : CCIV(0),RSIV(0),STOK(0),Bcond(false),Scond(false),mav1(0),mav2(0); CCIV = CCI(CCIP); RSIV = RSI(RSIP); STOK = StochasticsK(sto1,sto2); mav1 = ma(C,P1); mav2 = ma(C,P2); Bcond = CCIV <= 100 and RSIV <= 70 and Stok <= 80; Scond = CCIV >= -100 and RSIV >= 30 and Stok >= 20; #모두 과매수권을 벗어날째 매수(3개봉차이허용) if Bcond == true and Bcond[1] == false and countif(CrossDown(CCIV,100),2) >= 1 and countif(CrossDown(RSIV,70),2) >= 1 and countif(CrossDown(stok,80),2) >= 1 Then sell(""); #모두 과매도권을 벗어날째 매도(3개봉차이허용) if Scond == true and Scond[1] == false and countif(CrossUp(CCIV,-100),2) >= 1 and countif(CrossUp(RSIV,30),2) >= 1 and countif(CrossUp(stok,20),2) >= 1 Then buy(""); - 상기 식에서 이동평균도 추가하고 싶습니다. 과매수권을 벗어나서 매도로 진입하는 신호가 발생하고 5일선이 20일 선을 깨는 순간 완성된 봉에 진입가능한지 확인 부탁드립니다. 매수 진입도 같은 방식으로 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-08-26 11:44:12

안녕하세요 예스스탁입니다. input : CCIP(10),RSIP(10),sto1(10),sto2(5),P1(5),P2(20); input : loss(50),Profit11(20),Profit12(30),Profit2(50); var : CCIV(0),RSIV(0),STOK(0),Bcond(false),Scond(false),mav1(0),mav2(0),T(0); CCIV = CCI(CCIP); RSIV = RSI(RSIP); STOK = StochasticsK(sto1,sto2); mav1 = ma(C,P1); mav2 = ma(C,P2); Bcond = CCIV <= 100 and RSIV <= 70 and Stok <= 80; Scond = CCIV >= -100 and RSIV >= 30 and Stok >= 20; #모두 과매수권을 벗어날째 매수(3개봉차이허용) if Bcond == true and Bcond[1] == false and countif(CrossDown(CCIV,100),2) >= 1 and countif(CrossDown(RSIV,70),2) >= 1 and countif(CrossDown(stok,80),2) >= 1 Then T = -1; #모두 과매도권을 벗어날째 매도(3개봉차이허용) if Scond == true and Scond[1] == false and countif(CrossUp(CCIV,-100),2) >= 1 and countif(CrossUp(RSIV,30),2) >= 1 and countif(CrossUp(stok,20),2) >= 1 Then T = 1; if T == 1 and crossup(mav1,mav2) Then buy(); if T == -1 and CrossDown(mav1,mav2) Then sell(); 즐거운 하루되세요 > softtoug 님이 쓴 글입니다. > 제목 : 수식 문의 > 안녕하세요 하기 수식에 추가로 더하고 싶어서 문의드립니다. input : CCIP(10),RSIP(10),sto1(10),sto2(5),P1(5),P2(20); input : loss(50),Profit11(20),Profit12(30),Profit2(50); var : CCIV(0),RSIV(0),STOK(0),Bcond(false),Scond(false),mav1(0),mav2(0); CCIV = CCI(CCIP); RSIV = RSI(RSIP); STOK = StochasticsK(sto1,sto2); mav1 = ma(C,P1); mav2 = ma(C,P2); Bcond = CCIV <= 100 and RSIV <= 70 and Stok <= 80; Scond = CCIV >= -100 and RSIV >= 30 and Stok >= 20; #모두 과매수권을 벗어날째 매수(3개봉차이허용) if Bcond == true and Bcond[1] == false and countif(CrossDown(CCIV,100),2) >= 1 and countif(CrossDown(RSIV,70),2) >= 1 and countif(CrossDown(stok,80),2) >= 1 Then sell(""); #모두 과매도권을 벗어날째 매도(3개봉차이허용) if Scond == true and Scond[1] == false and countif(CrossUp(CCIV,-100),2) >= 1 and countif(CrossUp(RSIV,30),2) >= 1 and countif(CrossUp(stok,20),2) >= 1 Then buy(""); - 상기 식에서 이동평균도 추가하고 싶습니다. 과매수권을 벗어나서 매도로 진입하는 신호가 발생하고 5일선이 20일 선을 깨는 순간 완성된 봉에 진입가능한지 확인 부탁드립니다. 매수 진입도 같은 방식으로 부탁드립니다. 감사합니다.