커뮤니티

수식문의

프로필 이미지
softtoug
2016-09-10 13:15:13
138
글번호 101867
답변완료
안녕하세요 하기 수식에서 한가지 보충하고 싶습니다. 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) and mav2 > mav2[1] Then buy(); if T == -1 and CrossDown(mav1,mav2) and mav2 < mav2[1] Then sell(); 상기 수식으로 진행하는데... - 볼린져 상단밴드가 60 이평 아래에 있을때는 매수금지, 반대로 하단밴드가 60이평 위에 있을때는 매도금지 수식을 추가 부탁드립니다. 다음 신호에서 진입하는 것으로 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-12 13:33:42

안녕하세요 예스스탁입니다. input : CCIP(10),RSIP(10),sto1(10),sto2(5),P1(5),P2(20),P3(60),BBP(20),dv(2); 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); var : BBup(0),BBdn(0),mav3(0); CCIV = CCI(CCIP); RSIV = RSI(RSIP); STOK = StochasticsK(sto1,sto2); mav1 = ma(C,P1); mav2 = ma(C,P2); mav3 = ma(C,P3); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); 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) and mav2 > mav2[1] and BBup >= mav3 Then buy(); if T == -1 and CrossDown(mav1,mav2) and mav2 < mav2[1] and BBdn <= mav3 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),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) and mav2 > mav2[1] Then buy(); if T == -1 and CrossDown(mav1,mav2) and mav2 < mav2[1] Then sell(); 상기 수식으로 진행하는데... - 볼린져 상단밴드가 60 이평 아래에 있을때는 매수금지, 반대로 하단밴드가 60이평 위에 있을때는 매도금지 수식을 추가 부탁드립니다. 다음 신호에서 진입하는 것으로 부탁드립니다. 감사합니다.