커뮤니티

안녕하세요

프로필 이미지
자라도
2016-01-04 23:41:56
124
글번호 94020
답변완료
아래식에서 대장매수 와 대장매도 신호가 발생한 시점의 지수값 을 기억했다가 입력변수에서 입력된 값(selltic,,, buytic )을 받아서 대장매수 신호값이 33 이면 buytic 입력값이 10 이면 33 - 10 = 23 에 매수신호가 나오고 대장매도 신호값이 100 이면 selltic 입력값이 10 이면 100 + 10 = 110 에 매도신호가 나오게 하고 매수신호 진입후 대장매도면 청산 매도신호 진입후 대장매수면 청산 입니다. 입력값이 0 이면 대장매수 대장매도 발생한 지수값으로 진입 하려고 하는데 수정좀 부탁드립니다. input : b_time(000000),e_time(240000); input : selltic(0),buytic(0); var : T(0),BSetup(false),SSetup(false),PcntR(0),AvgValue(0); input : stoK_p11(50),stoK_p12(50),stoK_p13(10); input : ma_p11(25),ma_p12(5),ma_p13(15),ma_p17(15); input : sto1(150),sto2(6); Var:stoK1(0),stoD1(0),stok2(0); stok2 = StochasticsK(sto1,sto2); If b_time <= Time and Time <= e_time Then { stoK1 = StochasticsK(stoK_p11,stoK_p12); stoD1 = 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_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; if MarketPosition == -1 Then ExitShort("대장매수"); } 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_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; if MarketPosition == 1 Then ExitLong("대장매도"); } } if T == 1 and c < PriceScale - buytic Then buy("수"); if T == -1 and c > PriceScale + selltic Then sell("도");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-01-05 11:47:06

안녕하세요 예스스탁입니다. input : b_time(000000),e_time(240000); input : selltic(0),buytic(0); var : T(0),BSetup(false),SSetup(false),PcntR(0),AvgValue(0); input : stoK_p11(50),stoK_p12(50),stoK_p13(10); input : ma_p11(25),ma_p12(5),ma_p13(15),ma_p17(15); input : sto1(150),sto2(6); Var:stoK1(0),stoD1(0),stok2(0); stok2 = StochasticsK(sto1,sto2); If b_time <= Time and Time <= e_time Then { stoK1 = StochasticsK(stoK_p11,stoK_p12); stoD1 = 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_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; var1 = C; if MarketPosition == -1 Then{ ExitShort("대장매수"); } } 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_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; var2 = C; if MarketPosition == 1 Then{ ExitLong("대장매도"); } } } if T == 1 and c < var1-PriceScale*buytic Then buy("수"); if T == -1 and c > var2+PriceScale*selltic Then sell("도"); 즐거운 하루되세요 > 자라도 님이 쓴 글입니다. > 제목 : 안녕하세요 > 아래식에서 대장매수 와 대장매도 신호가 발생한 시점의 지수값 을 기억했다가 입력변수에서 입력된 값(selltic,,, buytic )을 받아서 대장매수 신호값이 33 이면 buytic 입력값이 10 이면 33 - 10 = 23 에 매수신호가 나오고 대장매도 신호값이 100 이면 selltic 입력값이 10 이면 100 + 10 = 110 에 매도신호가 나오게 하고 매수신호 진입후 대장매도면 청산 매도신호 진입후 대장매수면 청산 입니다. 입력값이 0 이면 대장매수 대장매도 발생한 지수값으로 진입 하려고 하는데 수정좀 부탁드립니다. input : b_time(000000),e_time(240000); input : selltic(0),buytic(0); var : T(0),BSetup(false),SSetup(false),PcntR(0),AvgValue(0); input : stoK_p11(50),stoK_p12(50),stoK_p13(10); input : ma_p11(25),ma_p12(5),ma_p13(15),ma_p17(15); input : sto1(150),sto2(6); Var:stoK1(0),stoD1(0),stok2(0); stok2 = StochasticsK(sto1,sto2); If b_time <= Time and Time <= e_time Then { stoK1 = StochasticsK(stoK_p11,stoK_p12); stoD1 = 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_p17)[1] < ma(C,ma_p17),1) == 1 Then { T = 1; if MarketPosition == -1 Then ExitShort("대장매수"); } 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_p17)[1] > ma(C,ma_p17),1) == 1 Then { T = -1; if MarketPosition == 1 Then ExitLong("대장매도"); } } if T == 1 and c < PriceScale - buytic Then buy("수"); if T == -1 and c > PriceScale + selltic Then sell("도");