커뮤니티

수정 부탁드립니다.

프로필 이미지
미완
2016-09-09 10:28:25
123
글번호 101828
답변완료
아래 수식에서 시스템신호에 의해 매수,매도 진입후 청산되는 신호에 동시에 다시 매도,매수 진입 신호가 떨어지는 경우에는 청산만 되고 진입은 되지 않도록 시스템신호 수정 부탁드립니다. input:b_time1(000000),e_time1(240000), stoK_p11(150),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(10),ma_p14(100), ma_p15(10),ma_p16(20),ma_p17(15),상단(90),하단(10),익절틱수(10); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); var:ma11(0),ma12(0),ma13(0),ma15(0),ma16(0),ma17(0); var:j(0),매수강도(0),매도강도(0); var : ma_P14_1(0),ma_P14_2(0),ma_P14_3(0),ma_P14_4(0),ma_P14_5(0); var : ma_P14_6(0),ma_P14_7(0),ma_P14_8(0),ma_P14_9(0),ma_P14_10(0),T2(0); Array:ma14[10](0),추세[10](""); ma11=ma(C,ma_P11); ma12=ma(C,ma_P12); ma13=ma(C,ma_P13); ma15=ma(C,ma_P15); ma16=ma(C,ma_P16); ma17=ma(C,ma_P17); ma_P14_1=ma_P14+1; ma_P14_2=ma_P14+2; ma_P14_3=ma_P14+3; ma_P14_4=ma_P14+4; ma_P14_5=ma_P14+5; ma_P14_6=ma_P14+6; ma_P14_7=ma_P14+7; ma_P14_8=ma_P14+8; ma_P14_9=ma_P14+9; ma_P14_10=ma_P14+10; ma14[1] = ma(C,ma_p14_1); ma14[2] = ma(C,ma_p14_2); ma14[3] = ma(C,ma_p14_3); ma14[4] = ma(C,ma_p14_4); ma14[5] = ma(C,ma_p14_5); ma14[6] = ma(C,ma_p14_6); ma14[7] = ma(C,ma_p14_7); ma14[8] = ma(C,ma_p14_8); ma14[9] = ma(C,ma_p14_9); ma14[10] = ma(C,ma_p14_10); 매수강도=0; 매도강도=0; If b_time1 <= Time and Time <= e_time1 Then { For j=1 TO 10 { If countif(ma11[1]<ma11,1)==1 and (ma12[1]<=ma13[1] and ma12>ma13) and countif(ma14[j][1]<ma14[j],1)==1 and countif(ma15[1]<ma15,1)==1 and countif(ma16[1]<ma16,1)==1 and countif(ma17[1]<ma17,1)==1 Then { 추세[j]="매수추세"; } If countif(ma11[1]>ma11,1)==1 and(ma12[1]>=ma13[1] and ma12<ma13) and countif(ma14[j][1]>ma14[j],1)==1 and countif(ma15[1]>ma15,1)==1 and countif(ma16[1]>ma16,1)==1 and countif(ma17[1]>ma17,1)==1 Then { 추세[j] = "매도추세"; } If 추세[j] == "매수추세" Then 매수강도 = 매수강도 +1; If 추세[j] == "매도추세" Then 매도강도 = 매도강도 +1; } If 매수강도 == 10 Then 추세[0] = "매수추세"; If 매도강도 == 10 Then 추세[0] = "매도추세"; T2 = iff(추세[0]=="매수추세",100,iff(추세[0]=="매도추세",-100,0)); stoK = StochasticsK(stoK_p11,stoK_p12); stoD = StochasticsD(stoK_p11,stoK_p12,stoK_p13); If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; } If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; } if T == 1 and CrossDown(stok,하단) Then buy("매수",AtMarket); if MarketPosition == 1 Then { if crossup(stok,상단) Then exitlong("매수1",AtMarket); if T == -1 and T2 == -100 Then exitlong("1번2번추세전환(-)",AtMarket); if T == 1 and T2 == -100 Then exitlong("2번추세전환(-)",atlimit,EntryPrice+PriceScale*2); } if T == -1 and Crossup(stok,상단) Then sell("매도",AtMarket); if MarketPosition == -1 Then { if Crossdown(stok,하단) Then ExitShort("매도1",AtMarket); if T == 1 and T2 == 100 Then exitShort("1번2번추세전환(+)",AtMarket); if T == -1 and T2 == 100 Then exitShort("2번추세전환(+)",Atlimit,EntryPrice-PriceScale*2); } } SetStopProfittarget(PriceScale*익절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-09 14:39:04

안녕하세요 예스스탁입니다. input:b_time1(000000),e_time1(240000), stoK_p11(150),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(10),ma_p14(100), ma_p15(10),ma_p16(20),ma_p17(15),상단(90),하단(10),익절틱수(10); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); var:ma11(0),ma12(0),ma13(0),ma15(0),ma16(0),ma17(0); var:j(0),매수강도(0),매도강도(0); var : ma_P14_1(0),ma_P14_2(0),ma_P14_3(0),ma_P14_4(0),ma_P14_5(0); var : ma_P14_6(0),ma_P14_7(0),ma_P14_8(0),ma_P14_9(0),ma_P14_10(0),T2(0); Array:ma14[10](0),추세[10](""); ma11=ma(C,ma_P11); ma12=ma(C,ma_P12); ma13=ma(C,ma_P13); ma15=ma(C,ma_P15); ma16=ma(C,ma_P16); ma17=ma(C,ma_P17); ma_P14_1=ma_P14+1; ma_P14_2=ma_P14+2; ma_P14_3=ma_P14+3; ma_P14_4=ma_P14+4; ma_P14_5=ma_P14+5; ma_P14_6=ma_P14+6; ma_P14_7=ma_P14+7; ma_P14_8=ma_P14+8; ma_P14_9=ma_P14+9; ma_P14_10=ma_P14+10; ma14[1] = ma(C,ma_p14_1); ma14[2] = ma(C,ma_p14_2); ma14[3] = ma(C,ma_p14_3); ma14[4] = ma(C,ma_p14_4); ma14[5] = ma(C,ma_p14_5); ma14[6] = ma(C,ma_p14_6); ma14[7] = ma(C,ma_p14_7); ma14[8] = ma(C,ma_p14_8); ma14[9] = ma(C,ma_p14_9); ma14[10] = ma(C,ma_p14_10); 매수강도=0; 매도강도=0; If b_time1 <= Time and Time <= e_time1 Then { For j=1 TO 10 { If countif(ma11[1]<ma11,1)==1 and (ma12[1]<=ma13[1] and ma12>ma13) and countif(ma14[j][1]<ma14[j],1)==1 and countif(ma15[1]<ma15,1)==1 and countif(ma16[1]<ma16,1)==1 and countif(ma17[1]<ma17,1)==1 Then { 추세[j]="매수추세"; } If countif(ma11[1]>ma11,1)==1 and(ma12[1]>=ma13[1] and ma12<ma13) and countif(ma14[j][1]>ma14[j],1)==1 and countif(ma15[1]>ma15,1)==1 and countif(ma16[1]>ma16,1)==1 and countif(ma17[1]>ma17,1)==1 Then { 추세[j] = "매도추세"; } If 추세[j] == "매수추세" Then 매수강도 = 매수강도 +1; If 추세[j] == "매도추세" Then 매도강도 = 매도강도 +1; } If 매수강도 == 10 Then 추세[0] = "매수추세"; If 매도강도 == 10 Then 추세[0] = "매도추세"; T2 = iff(추세[0]=="매수추세",100,iff(추세[0]=="매도추세",-100,0)); stoK = StochasticsK(stoK_p11,stoK_p12); stoD = StochasticsD(stoK_p11,stoK_p12,stoK_p13); If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; } If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; } if T == 1 and CrossDown(stok,하단) and MarketPosition <= 0 Then buy("매수",AtMarket); if MarketPosition == 1 Then { if crossup(stok,상단) Then exitlong("매수1",AtMarket); if T == -1 and T2 == -100 Then exitlong("1번2번추세전환(-)",AtMarket); if T == 1 and T2 == -100 Then exitlong("2번추세전환(-)",atlimit,EntryPrice+PriceScale*2); } if T == -1 and Crossup(stok,상단) and MarketPosition >= 0 Then sell("매도",AtMarket); if MarketPosition == -1 Then { if Crossdown(stok,하단) Then ExitShort("매도1",AtMarket); if T == 1 and T2 == 100 Then exitShort("1번2번추세전환(+)",AtMarket); if T == -1 and T2 == 100 Then exitShort("2번추세전환(+)",Atlimit,EntryPrice-PriceScale*2); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 미완 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 아래 수식에서 시스템신호에 의해 매수,매도 진입후 청산되는 신호에 동시에 다시 매도,매수 진입 신호가 떨어지는 경우에는 청산만 되고 진입은 되지 않도록 시스템신호 수정 부탁드립니다. input:b_time1(000000),e_time1(240000), stoK_p11(150),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(10),ma_p14(100), ma_p15(10),ma_p16(20),ma_p17(15),상단(90),하단(10),익절틱수(10); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); var:ma11(0),ma12(0),ma13(0),ma15(0),ma16(0),ma17(0); var:j(0),매수강도(0),매도강도(0); var : ma_P14_1(0),ma_P14_2(0),ma_P14_3(0),ma_P14_4(0),ma_P14_5(0); var : ma_P14_6(0),ma_P14_7(0),ma_P14_8(0),ma_P14_9(0),ma_P14_10(0),T2(0); Array:ma14[10](0),추세[10](""); ma11=ma(C,ma_P11); ma12=ma(C,ma_P12); ma13=ma(C,ma_P13); ma15=ma(C,ma_P15); ma16=ma(C,ma_P16); ma17=ma(C,ma_P17); ma_P14_1=ma_P14+1; ma_P14_2=ma_P14+2; ma_P14_3=ma_P14+3; ma_P14_4=ma_P14+4; ma_P14_5=ma_P14+5; ma_P14_6=ma_P14+6; ma_P14_7=ma_P14+7; ma_P14_8=ma_P14+8; ma_P14_9=ma_P14+9; ma_P14_10=ma_P14+10; ma14[1] = ma(C,ma_p14_1); ma14[2] = ma(C,ma_p14_2); ma14[3] = ma(C,ma_p14_3); ma14[4] = ma(C,ma_p14_4); ma14[5] = ma(C,ma_p14_5); ma14[6] = ma(C,ma_p14_6); ma14[7] = ma(C,ma_p14_7); ma14[8] = ma(C,ma_p14_8); ma14[9] = ma(C,ma_p14_9); ma14[10] = ma(C,ma_p14_10); 매수강도=0; 매도강도=0; If b_time1 <= Time and Time <= e_time1 Then { For j=1 TO 10 { If countif(ma11[1]<ma11,1)==1 and (ma12[1]<=ma13[1] and ma12>ma13) and countif(ma14[j][1]<ma14[j],1)==1 and countif(ma15[1]<ma15,1)==1 and countif(ma16[1]<ma16,1)==1 and countif(ma17[1]<ma17,1)==1 Then { 추세[j]="매수추세"; } If countif(ma11[1]>ma11,1)==1 and(ma12[1]>=ma13[1] and ma12<ma13) and countif(ma14[j][1]>ma14[j],1)==1 and countif(ma15[1]>ma15,1)==1 and countif(ma16[1]>ma16,1)==1 and countif(ma17[1]>ma17,1)==1 Then { 추세[j] = "매도추세"; } If 추세[j] == "매수추세" Then 매수강도 = 매수강도 +1; If 추세[j] == "매도추세" Then 매도강도 = 매도강도 +1; } If 매수강도 == 10 Then 추세[0] = "매수추세"; If 매도강도 == 10 Then 추세[0] = "매도추세"; T2 = iff(추세[0]=="매수추세",100,iff(추세[0]=="매도추세",-100,0)); stoK = StochasticsK(stoK_p11,stoK_p12); stoD = StochasticsD(stoK_p11,stoK_p12,stoK_p13); If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; } If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1 and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13)) and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1 and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1 and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1 and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; } if T == 1 and CrossDown(stok,하단) Then buy("매수",AtMarket); if MarketPosition == 1 Then { if crossup(stok,상단) Then exitlong("매수1",AtMarket); if T == -1 and T2 == -100 Then exitlong("1번2번추세전환(-)",AtMarket); if T == 1 and T2 == -100 Then exitlong("2번추세전환(-)",atlimit,EntryPrice+PriceScale*2); } if T == -1 and Crossup(stok,상단) Then sell("매도",AtMarket); if MarketPosition == -1 Then { if Crossdown(stok,하단) Then ExitShort("매도1",AtMarket); if T == 1 and T2 == 100 Then exitShort("1번2번추세전환(+)",AtMarket); if T == -1 and T2 == 100 Then exitShort("2번추세전환(+)",Atlimit,EntryPrice-PriceScale*2); } } SetStopProfittarget(PriceScale*익절틱수,PointStop);