안녕하세요, 트레이더 여러분! 오늘은 RSI와 모멘텀을 활용한 LB(매도) & SB(매수) 시스템 트레이딩에 대해 이야기해볼게요. 이전에 소개했었던 EA와 동일한 내용인데요, 이번에는 RSI와 모멘텀에 대한 파라미터를 설정할 수 있는 추가 코드가 포함되어 있습니다.
예를 들어, RSI의 매수 제한값을 70으로 설정하면, RSI가 70을 초과할 경우 EA는 대기 매수 주문을 하지 않게 됩니다. 이처럼 매매 전략을 보다 세밀하게 조정할 수 있어요.
코드를 수정하는 것은 정말 간단합니다. 프로그래밍에 대한 지식이 많지 않더라도 원하는 지표로 변경할 수 있습니다. 아래에서 새로운 변수들을 살펴볼까요?
extern int RSI_Period = 14;
extern int RSI_Buy_Restrict = 1.;
extern int RSI_Sell_Restrict = 1.;
extern int Momentum_Period = 14; // 변수에 추가된 코드입니다
extern int Momentum_Buy_Restrict = 1.;
extern int Momentum_Sell_Restrict = 1.;
double d_RSI = iRSI(Symbol(),0,RSI_Period, PRICE_CLOSE, 1);
double d_Momentum=iMomentum(Symbol(),0,Momentum_Period,PRICE_CLOSE,1); // 주문 전 이 두 줄을 추가합니다
&& d_Momentum < Momentum_Buy_Restrict && d_RSI < RSI_Buy_Restrict)
&& d_Momentum > Momentum_Sell_Restrict && d_RSI > RSI_Sell_Restrict) // 주문 발송 시 이 두 줄을 사용합니다
extern int RSI_Buy_Restrict = 1.;
extern int RSI_Sell_Restrict = 1.;
extern int Momentum_Period = 14; // 변수에 추가된 코드입니다
extern int Momentum_Buy_Restrict = 1.;
extern int Momentum_Sell_Restrict = 1.;
double d_RSI = iRSI(Symbol(),0,RSI_Period, PRICE_CLOSE, 1);
double d_Momentum=iMomentum(Symbol(),0,Momentum_Period,PRICE_CLOSE,1); // 주문 전 이 두 줄을 추가합니다
&& d_Momentum < Momentum_Buy_Restrict && d_RSI < RSI_Buy_Restrict)
&& d_Momentum > Momentum_Sell_Restrict && d_RSI > RSI_Sell_Restrict) // 주문 발송 시 이 두 줄을 사용합니다
이렇게 기본적인 코드를 설정한 후에는 여러분의 트레이딩 스타일에 맞게 조정해보세요. 적절한 설정으로 더 나은 트레이딩 결과를 기대할 수 있습니다. 질문이나 궁금한 점이 있다면 댓글로 남겨주세요!
댓글 0