커뮤니티

수식문의

프로필 이미지
softtoug
2017-02-23 10:42:48
112
글번호 107153
답변완료
안녕하세요 하기 수식문의 드립니다. input : P(14),BBP(20),dv(2),MAP(60); input : short(12),long(26),sig(9); var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0); var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0),diff(0),cnt(0),count(0); ADXV = ADX(P); DP = Diplus(P); DM = DiMinus(P); bbmd = ma(c,BBP); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); mav = ma(C,MAP); MACDV = MACD(short,long); MACDS = ema(MACDV,sig); diff = C-O; if MarketPosition <= 0 and C > BBup and C > O and countif(C > C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP > DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ buy("b2"); } if MarketPosition >= 0 and C < BBdn and C < O and countif(C < C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP < DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ sell("s2"); } 상기 수식에서 손절방법을 부탁드립니다. 1. 매도든 매수든 가격이 볼린져 밴드 중앙선과 닿으면 손절하는 수식 부탁드립니다. 2. MACD oscillator 가 바뀌면 손절하는 수식 부탁드립니다. 그리고 MACD ocillator 변경이 진입후 3개 봉이내에 바뀔경우에는 반대매매 부탁드립니다. 반대매매는 한번만 들어가는 것으로 부탁드립니다. 3. 더이상 ADX 라인이 증가하지 않으면, 매도 진입했던 것은 매수로 반대매매 진입, 매수 진입했던 것은 매도로 반대매매 진입 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-02-23 11:49:28

안녕하세요 예스스탁입니다. input : P(14),BBP(20),dv(2),MAP(60); input : short(12),long(26),sig(9); var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0); var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0),diff(0),cnt(0),count(0); var : MACDO(0); ADXV = ADX(P); DP = Diplus(P); DM = DiMinus(P); bbmd = ma(c,BBP); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); mav = ma(C,MAP); MACDV = MACD(short,long); MACDS = ema(MACDV,sig); MACDO = MACDV-MACDS; diff = C-O; if MarketPosition <= 0 and C > BBup and C > O and countif(C > C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP > DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ buy("b2"); } if MarketPosition >= 0 and C < BBdn and C < O and countif(C < C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP < DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ sell("s2"); } if MarketPosition == 1 Then{ ExitLong("bx1",AtStop,BBmd); if BarsSinceEntry > 3 and CrossDown(MACDO,0) Then ExitLong("bx2"); if IsEntryName("b2") == true and BarsSinceEntry <= 3 and CrossDown(MACDO,0) Then sell("bs1"); if ADXV <= ADXV[1] Then sell("bs2"); } if MarketPosition == -1 Then{ ExitShort("sx1",AtStop,BBmd); if BarsSinceEntry > 3 and CrossUp(MACDO,0) Then ExitShort("sx2"); if IsEntryName("s2") == true and BarsSinceEntry <= 3 and CrossDown(MACDO,0) Then Buy("sb1"); if ADXV <= ADXV[1] Then buy("sb2"); } 즐거운 하루되세요 > softtoug 님이 쓴 글입니다. > 제목 : 수식문의 > 안녕하세요 하기 수식문의 드립니다. input : P(14),BBP(20),dv(2),MAP(60); input : short(12),long(26),sig(9); var : ADXV(0),DP(0),DM(0),T(0),BBup(0),BBdn(0),mav(0); var : MACDV(0),MACDS(0),Bcond(false),Scond(False),bbmd(0),diff(0),cnt(0),count(0); ADXV = ADX(P); DP = Diplus(P); DM = DiMinus(P); bbmd = ma(c,BBP); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); mav = ma(C,MAP); MACDV = MACD(short,long); MACDS = ema(MACDV,sig); diff = C-O; if MarketPosition <= 0 and C > BBup and C > O and countif(C > C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP > DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ buy("b2"); } if MarketPosition >= 0 and C < BBdn and C < O and countif(C < C[1],2) == 2 and (ADXV < 40 or (ADXV > 40 and DP < DM)) and BBup-BBdn >= PriceScale*30 and countif(adxv > adxv[1],2) == 2 Then{ sell("s2"); } 상기 수식에서 손절방법을 부탁드립니다. 1. 매도든 매수든 가격이 볼린져 밴드 중앙선과 닿으면 손절하는 수식 부탁드립니다. 2. MACD oscillator 가 바뀌면 손절하는 수식 부탁드립니다. 그리고 MACD ocillator 변경이 진입후 3개 봉이내에 바뀔경우에는 반대매매 부탁드립니다. 반대매매는 한번만 들어가는 것으로 부탁드립니다. 3. 더이상 ADX 라인이 증가하지 않으면, 매도 진입했던 것은 매수로 반대매매 진입, 매수 진입했던 것은 매도로 반대매매 진입 부탁드립니다. 감사합니다.