커뮤니티

문의 사항

프로필 이미지
softtoug
2017-02-08 16:17:53
94
글번호 106654
답변완료
안녕하세요 하기 수식에서 한가지 더 추가 하고싶어서 메일드립니다. 하기 검토 부탁드립니다. 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; Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == -1 and BarsSinceEntry >= 2); Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == 1 and BarsSinceEntry >= 2); if CrossUp(BBdn,mav) and countif(crossdown(BBdn,mav),5) < 1 and DP < 40 and bcond == true Then buy("b1"); if CrossDown(BBup,mav) and countif(CrossUp(BBup,mav),5) < 1 and DM <40 and scond == true Then sell("s1"); if MarketPosition == 1 and IsEntryName("b1") == true Then{ if CrossDown(DP,DM) and scond == true Then sell("rs1"); } if MarketPosition == -1 and IsEntryName("s1") == true Then{ if CrossUp(DP,DM) and Bcond == true Then buy("rb1"); } if MarketPosition == 0 Then{ if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBdn and macdv >= macds then { buy("bb",AtStop,C-PriceScale);} if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBup and macdv <= macds then { sell("ss",AtStop,C+PriceScale);} 1. ADX가 40이상이고, ADX라인이 DP/DM 위에 있을때, DP가 위에 있으면 매도금지, DM이 위에 있을때는 매수 금지 수식을 추가 하고 싶습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-02-08 17:09:44

안녕하세요 예스스탁입니다. 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; Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == -1 and BarsSinceEntry >= 2); Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == 1 and BarsSinceEntry >= 2); if CrossUp(BBdn,mav) and countif(crossdown(BBdn,mav),5) < 1 and DP < 40 and bcond == true and (ADXV < 40 or (ADXV > 40 and DP > DM)) then buy("b1"); if CrossDown(BBup,mav) and countif(CrossUp(BBup,mav),5) < 1 and DM <40 and scond == true and (ADXV < 40 or (ADXV > 40 and DM > dP)) Then sell("s1"); if MarketPosition == 1 and IsEntryName("b1") == true Then{ if CrossDown(DP,DM) and scond == true Then sell("rs1"); } if MarketPosition == -1 and IsEntryName("s1") == true Then{ if CrossUp(DP,DM) and Bcond == true Then buy("rb1"); } if MarketPosition == 0 Then{ if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBdn and macdv >= macds and (ADXV < 40 or (ADXV > 40 and DP > DM)) then { buy("bb",AtStop,C-PriceScale);} if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBup and macdv <= macds and (ADXV < 40 or (ADXV > 40 and DM > dP)) then { sell("ss",AtStop,C+PriceScale);} } 즐거운 하루되세요 > 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; Bcond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == -1 and BarsSinceEntry >= 2); Scond = TotalTrades == 0 or (MarketPosition == 0 and BarsSinceExit(1) >= 2) or (MarketPosition == 1 and BarsSinceEntry >= 2); if CrossUp(BBdn,mav) and countif(crossdown(BBdn,mav),5) < 1 and DP < 40 and bcond == true Then buy("b1"); if CrossDown(BBup,mav) and countif(CrossUp(BBup,mav),5) < 1 and DM <40 and scond == true Then sell("s1"); if MarketPosition == 1 and IsEntryName("b1") == true Then{ if CrossDown(DP,DM) and scond == true Then sell("rs1"); } if MarketPosition == -1 and IsEntryName("s1") == true Then{ if CrossUp(DP,DM) and Bcond == true Then buy("rb1"); } if MarketPosition == 0 Then{ if MarketPosition(1) == 1 and IsExitName("StopTrailing",1) == true and H > BBdn and macdv >= macds then { buy("bb",AtStop,C-PriceScale);} if MarketPosition(1) == -1 and IsExitName("StopTrailing",1) == true and L < BBup and macdv <= macds then { sell("ss",AtStop,C+PriceScale);} 1. ADX가 40이상이고, ADX라인이 DP/DM 위에 있을때, DP가 위에 있으면 매도금지, DM이 위에 있을때는 매수 금지 수식을 추가 하고 싶습니다.