커뮤니티

시스템 수식 다시한번 체크 부탁드립니다.

프로필 이미지
타푸
2015-02-13 11:06:04
153
글번호 83194
답변완료

첨부 이미지

올려주신 수식 잘 받았습니다. 지표는 정상적으로 표시가 되는데 시스템은 정상적으로 안나오네요. 나오지말아야할 부분에서 신호가 발생하고 나와야할 부분에서는 안나오는 경우가 있습니다. 진입 후 청산이 되면 새로운 진입할 때 직전 캔들이 3개의 연속화살표라는 조건이 만족 안되면 신호가 발생하지 말아야합니다. 그리고 10틱이상 수익발생시 본절설정이 안되어있네요. 올려주신 수식은 아래와 같습니다. 다시 한번 체크 부탁드립니다. 감사합니다! ------------------------------------------------------- var : T(0),wmav(0); wmav = wma(c,5); if C > ma(C,5) && ma(C, 5) > ma(C,10) && ma(C,10) > ma(C,20) Then{ T = 1; if T == 1 and T[1] != 1 Then var1 = 0; var1 = var1+1; } if C < ma(C,5) && ma(C, 5) < ma(C,10) && ma(C,10) < ma(C,20) Then{ T = -1; if T == -1 and T[1] != -1 Then var1 = 0; var1 = var1-1; } #매수조건 3회이상 발생후에 가중이평 -3틱까지 시세가 하락하면 매수 if T == 1 and var1 >= 3 Then buy("매수",atlimit,wmav-PriceScale*3); #매도조건 3회이상 발생후에 가중이평 +3틱까지 시세가 상승하면 매도 if T == -1 and var1 <= -3 Then sell("매도",atlimit,wmav+PriceScale*3); if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then exitlong("bx",AtStop,EntryPrice); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("sx",AtStop,EntryPrice); SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*20,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-02-13 17:12:21

안녕하세요 예스스탁입니다. 각구간에서 한번씩만 진입되게 수정했습니다. if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then exitlong("bx",AtStop,EntryPrice); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("sx",AtStop,EntryPrice); 수식내용 중 위 내용이 10틱이상 수익발생시 진입가로 다시 되돌아 오면 청산하는 식입니다. var : T(0),wmav(0),Bcond(false),Scond(false); wmav = wma(c,5); if C > ma(C,5) && ma(C, 5) > ma(C,10) && ma(C,10) > ma(C,20) Then{ T = 1; if T == 1 and T[1] != 1 Then var1 = 0; var1 = var1+1; Bcond = false; } if C < ma(C,5) && ma(C, 5) < ma(C,10) && ma(C,10) < ma(C,20) Then{ T = -1; if T == -1 and T[1] != -1 Then var1 = 0; var1 = var1-1; Scond = false; } #매수조건 3회이상 발생후에 가중이평 -3틱까지 시세가 하락하면 매수 if T == 1 and var1 >= 3 and Bcond == false Then buy("매수",atlimit,wmav-PriceScale*3); if MarketPosition == 1 Then Bcond = true; #매도조건 3회이상 발생후에 가중이평 +3틱까지 시세가 상승하면 매도 if T == -1 and var1 <= -3 and Scond == false Then sell("매도",atlimit,wmav+PriceScale*3); if MarketPosition == -1 Then Scond = true; if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then exitlong("bx",AtStop,EntryPrice); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("sx",AtStop,EntryPrice); SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*20,PointStop); 즐거운 하루되세요 > 타푸 님이 쓴 글입니다. > 제목 : 시스템 수식 다시한번 체크 부탁드립니다. > 올려주신 수식 잘 받았습니다. 지표는 정상적으로 표시가 되는데 시스템은 정상적으로 안나오네요. 나오지말아야할 부분에서 신호가 발생하고 나와야할 부분에서는 안나오는 경우가 있습니다. 진입 후 청산이 되면 새로운 진입할 때 직전 캔들이 3개의 연속화살표라는 조건이 만족 안되면 신호가 발생하지 말아야합니다. 그리고 10틱이상 수익발생시 본절설정이 안되어있네요. 올려주신 수식은 아래와 같습니다. 다시 한번 체크 부탁드립니다. 감사합니다! ------------------------------------------------------- var : T(0),wmav(0); wmav = wma(c,5); if C > ma(C,5) && ma(C, 5) > ma(C,10) && ma(C,10) > ma(C,20) Then{ T = 1; if T == 1 and T[1] != 1 Then var1 = 0; var1 = var1+1; } if C < ma(C,5) && ma(C, 5) < ma(C,10) && ma(C,10) < ma(C,20) Then{ T = -1; if T == -1 and T[1] != -1 Then var1 = 0; var1 = var1-1; } #매수조건 3회이상 발생후에 가중이평 -3틱까지 시세가 하락하면 매수 if T == 1 and var1 >= 3 Then buy("매수",atlimit,wmav-PriceScale*3); #매도조건 3회이상 발생후에 가중이평 +3틱까지 시세가 상승하면 매도 if T == -1 and var1 <= -3 Then sell("매도",atlimit,wmav+PriceScale*3); if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then exitlong("bx",AtStop,EntryPrice); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("sx",AtStop,EntryPrice); SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*20,PointStop);