커뮤니티

부탁합니다

프로필 이미지
as8282
2020-02-12 01:12:47
315
글번호 135844
답변완료
다시 부탁드립니다. 트릭스지표 input : Period(12),Period1(20); var1 = trix(Period); var2 = ma(C,Period1); if crossup(var1,0) Then value1 = var2; if var2 > value1 Then value1 = var2; if CrossDown(var1,0) Then value2 = var2; if var2 < value2 Then value2 = var2; plot1(value1); plot2(value2); smi지표 input : g(12),r(25),s(2); var1 = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5,r),s) * 100/ (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)); plot1(var1); plot2(40); plot3(-40); 1.매수 1-1 ) 트릭스 지표에서 plot1의 가격이 전전봉과 전봉이 같다가 ( 가격이 동일하다 ) 내려오면 매수 ( 단, smi지표의 plot2(40) 이상일때는 신규매수금지 ) 1-2 ) 청산이 되고난후 포지션이 없을경우 plot1 가격이 전전봉과 전봉이 같다가 ( 가격이 동일하다 ) 올라가면 매수 ( 단, plot2 의 가격이 전봉과 같아야함 ) 2. 매수청산 1-1) plot2 가격 밑에서 13틱 ( 종가아닌 실시간체결 - 13틱이면 시장가체결 ) 1-2) 매도신호 (단, 청산신호에는 smi 지표의 plot3(-40) 를 적용하지않음 ) 1-3) plot1 가격 밑에서 25틱 ( 종가기준 ) 매도는 반대 ### 시간적용을 할수있게 부탁합니다. ( 10:30 ~ 12:50 ), ( 14:10 ~ 16:50 ) , ( 23:00 ~ 01:50 ) 생각외로 다른신호가 발생되어 귀찮게 해드리는같네요. 미리 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-12 14:51:03

안녕하세요 예스스탁입니다. input : Period(12),Period1(20); input : StartTime1(103000),EndTime1(125000); input : StartTime2(141000),EndTime2(165000); input : StartTime3(23000),EndTime3(015000); var : Tcond(false); if (sdate != sdate[1] and stime >= StartTime1) or (sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime1) or (sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime2) or (sdate == sdate[1] and stime >= StartTime2 and stime[1] < StartTime2) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime2) or (sdate == sdate[1] and stime >= EndTime2 and stime[1] < EndTime2) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime3) or (sdate == sdate[1] and stime >= StartTime3 and stime[1] < StartTime3) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime3) or (sdate == sdate[1] and stime >= EndTime3 and stime[1] < EndTime3) Then Tcond = False; var1 = trix(Period); var2 = ma(C,Period1); if crossup(var1,0) Then value1 = var2; if var2 > value1 Then value1 = var2; if CrossDown(var1,0) Then value2 = var2; if var2 < value2 Then value2 = var2; #plot1(value1); #plot2(value2); input : g(12),r(25),s(2); var11 = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5,r),s) * 100/ (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)); #plot1(var11); #plot2(40); #plot3(-40); if tcond == true then { if MarketPosition <= 0 and value1 < value1[1] and value1[1] == value1[2] then { ExitShort("sx2"); if var11 < 40 Then buy("b1"); } if MarketPosition(1) != 0 and MarketPosition == 0 and value1 > value1[1] and value1[1] == value1[2] and value2 == value2[1] Then buy("b2"); if MarketPosition == 1 then { ExitLong("bx1",AtStop,value2-PriceScale*13); if c <= value1-PriceScale*25 Then ExitLong("bx3"); } if MarketPosition >= 0 and value1 > value1[1] and value1[1] == value1[2] then { ExitLong("bx2"); if var11 > -40 Then sell("s1"); } if MarketPosition(1) != 0 and MarketPosition == 0 and value1 < value1[1] and value1[1] == value1[2] and value2 == value2[1] Then sell("s2"); if MarketPosition == -1 then { ExitShort("sx1",AtStop,value2+PriceScale*13); if c >= value1+PriceScale*25 Then ExitShort("sx3"); } } 즐거운 하루되세요 > as8282 님이 쓴 글입니다. > 제목 : 부탁합니다 > 다시 부탁드립니다. 트릭스지표 input : Period(12),Period1(20); var1 = trix(Period); var2 = ma(C,Period1); if crossup(var1,0) Then value1 = var2; if var2 > value1 Then value1 = var2; if CrossDown(var1,0) Then value2 = var2; if var2 < value2 Then value2 = var2; plot1(value1); plot2(value2); smi지표 input : g(12),r(25),s(2); var1 = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5,r),s) * 100/ (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)); plot1(var1); plot2(40); plot3(-40); 1.매수 1-1 ) 트릭스 지표에서 plot1의 가격이 전전봉과 전봉이 같다가 ( 가격이 동일하다 ) 내려오면 매수 ( 단, smi지표의 plot2(40) 이상일때는 신규매수금지 ) 1-2 ) 청산이 되고난후 포지션이 없을경우 plot1 가격이 전전봉과 전봉이 같다가 ( 가격이 동일하다 ) 올라가면 매수 ( 단, plot2 의 가격이 전봉과 같아야함 ) 2. 매수청산 1-1) plot2 가격 밑에서 13틱 ( 종가아닌 실시간체결 - 13틱이면 시장가체결 ) 1-2) 매도신호 (단, 청산신호에는 smi 지표의 plot3(-40) 를 적용하지않음 ) 1-3) plot1 가격 밑에서 25틱 ( 종가기준 ) 매도는 반대 ### 시간적용을 할수있게 부탁합니다. ( 10:30 ~ 12:50 ), ( 14:10 ~ 16:50 ) , ( 23:00 ~ 01:50 ) 생각외로 다른신호가 발생되어 귀찮게 해드리는같네요. 미리 감사드립니다.