예스스탁
예스스탁 답변
2021-07-02 12:58:18
안녕하세요
예스스탁입니다.
input : P1(3),P2(10),short(12),long(26),sig(9),익절(0.5),손절(1.3);
var : mav1(0),mav2(0),macdv(0),macds(0),T(0);
var : month(0),nday(0),week(0);
mav1 = ma(c,P1);
mav2 = ma(C,P2);
macdv = macd(short,long);
macds = ma(macdv,sig);
if CrossUp(mav1,mav2) Then
T = 1;
if CrossDown(mav1,mav2) Then
T = -1;
if T == 1 and CrossUp(macdv,macds) Then
{
T = 2;
Buy("b");
}
if T == -1 and CrossDown(macdv,macds) Then
{
T = -1;
Sell("s");
}
SetStopLoss(손절,PointStop);
SetStopProfittarget(익절,PointStop);
month = int(date/100)-int(date/10000)*100;
nday = date - int(date/100)*100;
Week = DayOfWeek(date);
if (month%3 == 0 and nday >= 8 and nday <= 14 and week == 4) then
SetStopEndofday(151500);
Else
SetStopEndofday(153000);
}
즐거운 하루되세요
> 손추 님이 쓴 글입니다.
> 제목 : 코딩 요청
> 매번 답변에 진심으로 감사드립니다.
아래 코팅 요청하오니 부탁드립니다.
-------------
3-10이평(단순) 골든크로스 발생하고
MACD(12,26,9,단순) 골든크로스 발생되면 매수 진입
3-10이평(단순) 데드크로스 발생하고
MACD(12,26,9,단순) 데드크로스 발생되면 매도 진입
손절은 0.5포, 익절은 1.3포
미청산 포지션은 당일 종가 청산.