커뮤니티

시스템수식 부탁드립니다.

프로필 이미지
미완
2016-05-16 21:58:47
127
글번호 98141
답변완료
[지표수식] input:b_time1(000000),e_time1(240000), stoK_p11(50),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250), ma_p15(20),ma_p16(10),ma_p17(38); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); If b_time1 <= Time and Time <= e_time1 Then { 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; } plot1(iff(T==1,100,iff(T==-1,-100,0))); plotbaseline1(0); } 위 지표를 추세로 보고 아래의 조건으로 시스템 수식 부탁드립니다. [매수추세일 때 진입조건] 스토캐스틱 지표가 기준선 값(예:10) 이하로 내려갔다가 한틱 올라올 때 매수진입 1. 매수 후 기준선 값(예:90) 이상으로 올라갔다가 한틱 내려올 때 매수청산 2. 매수 후 기준선 값(예:90) 도달 전 15틱 상승시 자동 익절 3. 매수 후 지표 추세 전환시 자동 매수청산 [매도추세일 때 진입조건] 스토캐스틱 지표가 기준선 값(예:90) 이상으로 올라갔다가 한틱 내려올 때 매도진입 1. 매도 후 기준선 값(예:10) 이하로 내려왔다가 한틱 올라올 때 매도청산 2. 매도 후 기준선 값(예:10) 도달 전 15틱 하락시 자동 익절 3. 매도 후 지표 추세 전환시 자동 매도청산 * 자동 익절 틱수, 스토캐스틱 값(period, period1, period2, 기준선 상하값)은 속성에서 변경토록 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-05-17 13:32:53

안녕하세요 예스스탁입니다. input:b_time1(000000),e_time1(240000), stoK_p11(50),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250), ma_p15(20),ma_p16(10),ma_p17(38),상단(90),하단(10),익절틱수(15); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); If b_time1 <= Time and Time <= e_time1 Then { 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 crossup(stok,하단) Then buy(); if MarketPosition == 1 Then{ if CrossDown(stok,상단) Then exitlong(); if T == -1 Then exitlong(); } if T == -1 and CrossDown(stok,상단) Then sell(); if MarketPosition == 1 Then{ if Crossup(stok,하단) Then ExitShort(); if T == 1 Then ExitShort(); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 미완 님이 쓴 글입니다. > 제목 : 시스템수식 부탁드립니다. > [지표수식] input:b_time1(000000),e_time1(240000), stoK_p11(50),stoK_p12(50),stoK_p13(10), ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250), ma_p15(20),ma_p16(10),ma_p17(38); Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0),T(0); If b_time1 <= Time and Time <= e_time1 Then { 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; } plot1(iff(T==1,100,iff(T==-1,-100,0))); plotbaseline1(0); } 위 지표를 추세로 보고 아래의 조건으로 시스템 수식 부탁드립니다. [매수추세일 때 진입조건] 스토캐스틱 지표가 기준선 값(예:10) 이하로 내려갔다가 한틱 올라올 때 매수진입 1. 매수 후 기준선 값(예:90) 이상으로 올라갔다가 한틱 내려올 때 매수청산 2. 매수 후 기준선 값(예:90) 도달 전 15틱 상승시 자동 익절 3. 매수 후 지표 추세 전환시 자동 매수청산 [매도추세일 때 진입조건] 스토캐스틱 지표가 기준선 값(예:90) 이상으로 올라갔다가 한틱 내려올 때 매도진입 1. 매도 후 기준선 값(예:10) 이하로 내려왔다가 한틱 올라올 때 매도청산 2. 매도 후 기준선 값(예:10) 도달 전 15틱 하락시 자동 익절 3. 매도 후 지표 추세 전환시 자동 매도청산 * 자동 익절 틱수, 스토캐스틱 값(period, period1, period2, 기준선 상하값)은 속성에서 변경토록 부탁드립니다.