커뮤니티

시스템 작성좀 부탁드립니다.^^

프로필 이미지
진짜원칙매매
2017-01-12 17:03:02
90
글번호 105850
답변완료
input : P1(1),P2(2),P3(3); input : Period11(5),Period12(6),Period13(2); input : Period21(7),Period22(8),Period23(2); input : Period31(9),Period32(10),Period33(2); input : Period41(11),Period42(12),Period43(2); var : wma1(0),wma2(0),wma3(0); var : SMI1(0),SMI2(0),SMI3(0),SMI4(0); wma1 = wma(c,P1); wma2 = wma(c,P2); wma3 = wma(C,P3); SMI1 = SMI(Period11,Period12,Period13); SMI2 = SMI(Period21,Period22,Period23); SMI3 = SMI(Period31,Period32,Period33); SMI4 = SMI(Period41,Period42,Period43); if wma1 > wma2 and wma2 > wma3 and SMI3 > 0 and SMI4 > 0 and SMI3 > SMI4 and ((SMI2 > 0 and crossup(SMI1,0)) or (SMI1 > 0 and crossup(SMI2,0))) Then buy(); if wma1 < wma2 and wma2 < wma3 and SMI3 < 0 and SMI4 < 0 and SMI3 < SMI4 and ((SMI2 < 0 and CrossDown(SMI1,0)) or (SMI1 < 0 and CrossDown(SMI2,0))) Then sell(); 수고 많으십니다. 위 식에서 청산조건을 넣고 싶은데요. 매수 청산 조건: 가중이동평균P1(1)<가중이동평균선P3(3)일때 청산 매도 청산 조건: 가중이동평균P1(1)>가중이동평균선P3(3)일때 청산 부탁드립니다.^^*
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-01-13 09:57:25

안녕하세요 예스스탁입니다. input : P1(1),P2(2),P3(3); input : Period11(5),Period12(6),Period13(2); input : Period21(7),Period22(8),Period23(2); input : Period31(9),Period32(10),Period33(2); input : Period41(11),Period42(12),Period43(2); var : wma1(0),wma2(0),wma3(0); var : SMI1(0),SMI2(0),SMI3(0),SMI4(0); wma1 = wma(c,P1); wma2 = wma(c,P2); wma3 = wma(C,P3); SMI1 = SMI(Period11,Period12,Period13); SMI2 = SMI(Period21,Period22,Period23); SMI3 = SMI(Period31,Period32,Period33); SMI4 = SMI(Period41,Period42,Period43); if wma1 > wma2 and wma2 > wma3 and SMI3 > 0 and SMI4 > 0 and SMI3 > SMI4 and ((SMI2 > 0 and crossup(SMI1,0)) or (SMI1 > 0 and crossup(SMI2,0))) Then buy(); if wma1 < wma2 and wma2 < wma3 and SMI3 < 0 and SMI4 < 0 and SMI3 < SMI4 and ((SMI2 < 0 and CrossDown(SMI1,0)) or (SMI1 < 0 and CrossDown(SMI2,0))) Then sell(); if MarketPosition == 1 and wma1 < wma3 Then exitlong(); if MarketPosition == -1 and wma1 > wma3 Then ExitShort(); 즐거운 하루되세요 > 진짜원칙매매 님이 쓴 글입니다. > 제목 : 시스템 작성좀 부탁드립니다.^^ > input : P1(1),P2(2),P3(3); input : Period11(5),Period12(6),Period13(2); input : Period21(7),Period22(8),Period23(2); input : Period31(9),Period32(10),Period33(2); input : Period41(11),Period42(12),Period43(2); var : wma1(0),wma2(0),wma3(0); var : SMI1(0),SMI2(0),SMI3(0),SMI4(0); wma1 = wma(c,P1); wma2 = wma(c,P2); wma3 = wma(C,P3); SMI1 = SMI(Period11,Period12,Period13); SMI2 = SMI(Period21,Period22,Period23); SMI3 = SMI(Period31,Period32,Period33); SMI4 = SMI(Period41,Period42,Period43); if wma1 > wma2 and wma2 > wma3 and SMI3 > 0 and SMI4 > 0 and SMI3 > SMI4 and ((SMI2 > 0 and crossup(SMI1,0)) or (SMI1 > 0 and crossup(SMI2,0))) Then buy(); if wma1 < wma2 and wma2 < wma3 and SMI3 < 0 and SMI4 < 0 and SMI3 < SMI4 and ((SMI2 < 0 and CrossDown(SMI1,0)) or (SMI1 < 0 and CrossDown(SMI2,0))) Then sell(); 수고 많으십니다. 위 식에서 청산조건을 넣고 싶은데요. 매수 청산 조건: 가중이동평균P1(1)<가중이동평균선P3(3)일때 청산 매도 청산 조건: 가중이동평균P1(1)>가중이동평균선P3(3)일때 청산 부탁드립니다.^^*