커뮤니티
수식 문의 드립니다.
2017-02-07 10:24:59
114
글번호 106580
아침저녁으로 쌀쌀합니다. 감기조심하시구요^^ 수식좀 부탁드립니다.
input : P1(1),P2(2),P3(3);
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(2);
input : Period31(6),Period32(7),Period33(2);
input : Period41(8),Period42(9),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
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
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 < wma2 Then
exitlong();
if MarketPosition == -1 and wma1 > wma2 Then
ExitShort();
위 조건식에서요 RSI조건을 추가 하고 싶습니다.
매수조건 :위 조건식을 만족하면서(동시에) RSI 기준선 70이상일때
매도조건 :위 조건식을 만족하면서(동시에) RSI 기준선 30이하일때
부탁드립니다.~~~~~
답변 1
예스스탁 예스스탁 답변
2017-02-07 13:45:41
안녕하세요
예스스탁입니다.
input : P1(1),P2(2),P3(3);
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(2);
input : Period31(6),Period32(7),Period33(2);
input : Period41(8),Period42(9),Period43(2);
input : RSIP(14);
var : wma1(0),wma2(0),wma3(0),RSIV(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);
RSIV = RSI(RSIP);
if RSIV >= 70 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 RSIV <= 30 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 < wma2 Then
exitlong();
if MarketPosition == -1 and wma1 > wma2 Then
ExitShort();
즐거운 하루되세요
> 진짜원칙매매 님이 쓴 글입니다.
> 제목 : 수식 문의 드립니다.
> 아침저녁으로 쌀쌀합니다. 감기조심하시구요^^ 수식좀 부탁드립니다.
input : P1(1),P2(2),P3(3);
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(2);
input : Period31(6),Period32(7),Period33(2);
input : Period41(8),Period42(9),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
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
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 < wma2 Then
exitlong();
if MarketPosition == -1 and wma1 > wma2 Then
ExitShort();
위 조건식에서요 RSI조건을 추가 하고 싶습니다.
매수조건 :위 조건식을 만족하면서(동시에) RSI 기준선 70이상일때
매도조건 :위 조건식을 만족하면서(동시에) RSI 기준선 30이하일때
부탁드립니다.~~~~~