커뮤니티

함수 문의

프로필 이미지
softtoug
2016-09-26 09:21:13
116
글번호 102171
답변완료
안녕하세요 1. ADX 지표로 시스템을 만들고 싶습니다. 기본조건 : ADX 지수 20 (수치조절가능) 이 넘은 상태에서만 거래 가능 : 20 아하에서는 시스템이 작동하지 않습니다. 20 위에있는지 아래있는지 메인 챠트에 표시가 가능한지요? 같이 표현하고 싶습니다. 세부사항 진입 : * ADX line 이 20 이하에서 20위로 올라오는 순간 진입합니다. 진입 포지션 : 진입하는 순간 +DI가 위에 있으면 매수 진입 진입하는 순간 -DI가 위에 있으면 매도 진입. 청산 * ADX 선이 20 위로 상향 진입 후, DI 선이 cross를 하면 청산 합니다. * ADX 선이 20 위에 있다가 아래도 내려가면 청산 합니다. 2. 상기 완성된 식을 하기식과 병행해서 같이 사용할 수 있는지 확인 부탁드립니다. 신호는 각각의 모든 신호발생시 마다 적용하는 것으로 부탁드립니다. 즉 합성전략을 짜고 싶습니다. 단, 겹치는 신호는 무시합니다. 현재 매수 보유중인데 매수 신호가 발생했다고 해서, 추가 매수진입은 하지 않습니다. input : RSIP(9),sto1(12),sto2(5); input : BBP(20),dv(2),P(60); input : short(12),long(26),sig(9); input : RSI과매수(70),RSI과매도(30); input : Sto과매수(80),Sto과매도(20); input : MACD매수제한기준(-1),MACD매도제한기준(1); input : N(5); var : RSIV(0,data1),stok(0,data1),MACDO(0,data1),MACDV(0,data1); RSIV = data1(RSI(RSIP)); Stok = data1(StochasticsK(sto1,sto2)); MACDV = data1(MACD(short,long)); MACDO = data1(MACD_OSC(short,long,sig)); if data1(CrossDown(RSIV,RSI과매수) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(stok,Sto과매수) and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(MACDO,0) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1) Then{ if data1(MACDv < MACD매도제한기준) Then sell("s"); } if data1(CrossUp(RSIV,RSI과매도) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(stok,Sto과매도) and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(MACDO,0) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1) Then{ if data1(MACDv > MACD매수제한기준) Then buy("b"); } 번거롭게 해서 죄송합니다. 감사합니다. 검토 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-26 13:55:54

안녕하세요 예스스탁입니다. 1. input : P(14); var : ADXV(0),DP(0),DM(0); ADXV = ADX(P); DP = Diplus(P); DM = DiMinus(P); if crossup(ADXV,20) Then{ if DP > DM Then buy(); if DP < DM Then sell(); } if MarketPosition == 1 Then{ if CrossDown(ADXV,20) Then ExitLong(); if CrossDown(DP,DM) Then ExitShort(); } if MarketPosition == -1 Then{ if CrossDown(ADXV,20) Then ExitShort(); if CrossUp(DP,DM) Then ExitShort(); } 2 input : RSIP(9),sto1(12),sto2(5); input : short(12),long(26),sig(9); input : RSI과매수(70),RSI과매도(30); input : Sto과매수(80),Sto과매도(20); input : MACD매수제한기준(-1),MACD매도제한기준(1); input : N(5); var : RSIV(0,data1),stok(0,data1),MACDO(0,data1),MACDV(0,data1); input : P(14); var : ADXV(0,data1),DP(0),DM(0,data1); RSIV = data1(RSI(RSIP)); Stok = data1(StochasticsK(sto1,sto2)); MACDV = data1(MACD(short,long)); MACDO = data1(MACD_OSC(short,long,sig)); ADXV = data1(ADX(P)); DP = data1(Diplus(P)); DM = data1(DiMinus(P)); if data1(CrossDown(RSIV,RSI과매수) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(stok,Sto과매수) and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(MACDO,0) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1) Then{ if data1(MACDv < MACD매도제한기준) Then sell("s1"); } if data1(CrossUp(RSIV,RSI과매도) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(stok,Sto과매도) and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(MACDO,0) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1) Then{ if data1(MACDv > MACD매수제한기준) Then buy("b1"); } if crossup(ADXV,20) Then{ if DP > DM Then buy("b2"); if DP < DM Then sell("s2"); } if MarketPosition == 1 and IsEntryName("b2") == true Then{ if CrossDown(ADXV,20) Then ExitLong(); if CrossDown(DP,DM) Then ExitShort(); } if MarketPosition == -1 and IsEntryName("s") == true Then{ if CrossDown(ADXV,20) Then ExitShort(); if CrossUp(DP,DM) Then ExitShort(); } 즐거운 하루되세요 > softtoug 님이 쓴 글입니다. > 제목 : 함수 문의 > 안녕하세요 1. ADX 지표로 시스템을 만들고 싶습니다. 기본조건 : ADX 지수 20 (수치조절가능) 이 넘은 상태에서만 거래 가능 : 20 아하에서는 시스템이 작동하지 않습니다. 20 위에있는지 아래있는지 메인 챠트에 표시가 가능한지요? 같이 표현하고 싶습니다. 세부사항 진입 : * ADX line 이 20 이하에서 20위로 올라오는 순간 진입합니다. 진입 포지션 : 진입하는 순간 +DI가 위에 있으면 매수 진입 진입하는 순간 -DI가 위에 있으면 매도 진입. 청산 * ADX 선이 20 위로 상향 진입 후, DI 선이 cross를 하면 청산 합니다. * ADX 선이 20 위에 있다가 아래도 내려가면 청산 합니다. 2. 상기 완성된 식을 하기식과 병행해서 같이 사용할 수 있는지 확인 부탁드립니다. 신호는 각각의 모든 신호발생시 마다 적용하는 것으로 부탁드립니다. 즉 합성전략을 짜고 싶습니다. 단, 겹치는 신호는 무시합니다. 현재 매수 보유중인데 매수 신호가 발생했다고 해서, 추가 매수진입은 하지 않습니다. input : RSIP(9),sto1(12),sto2(5); input : BBP(20),dv(2),P(60); input : short(12),long(26),sig(9); input : RSI과매수(70),RSI과매도(30); input : Sto과매수(80),Sto과매도(20); input : MACD매수제한기준(-1),MACD매도제한기준(1); input : N(5); var : RSIV(0,data1),stok(0,data1),MACDO(0,data1),MACDV(0,data1); RSIV = data1(RSI(RSIP)); Stok = data1(StochasticsK(sto1,sto2)); MACDV = data1(MACD(short,long)); MACDO = data1(MACD_OSC(short,long,sig)); if data1(CrossDown(RSIV,RSI과매수) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(stok,Sto과매수) and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1 and MACDO < 0 and countif(CrossDown(MACDO,0),N) >= 1) or data1(CrossDown(MACDO,0) and stok < Sto과매수 and countif(CrossDown(stok,Sto과매수),N) >= 1 and RSIV < RSI과매수 and countif(CrossDown(RSIV ,RSI과매수),N) >= 1) Then{ if data1(MACDv < MACD매도제한기준) Then sell("s"); } if data1(CrossUp(RSIV,RSI과매도) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(stok,Sto과매도) and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1 and MACDO > 0 and countif(CrossUp(MACDO,0),N) >= 1) or data1(CrossUp(MACDO,0) and stok > Sto과매도 and countif(CrossUp(stok,Sto과매도),N) >= 1 and RSIV > RSI과매도 and countif(Crossup(RSIV ,RSI과매도),N) >= 1) Then{ if data1(MACDv > MACD매수제한기준) Then buy("b"); } 번거롭게 해서 죄송합니다. 감사합니다. 검토 부탁드립니다. 감사합니다.