커뮤니티
수식 부탁 드리겠습니다
2016-12-26 00:45:21
129
글번호 105263
만들어주신 수식에 일부 수정 부탁드립니다 감사합니다
수정 및 추가내용은 매수1번 매도1번 매수청산3번입니다
매수
1)단순이평선 20선 > 60선 (외부변수) 혹은 20선이 상승추세 and
2)스토캐스틱 (20돌파 or 20 이하에서 골든크로스) and
3)macd기반스토캐스틱 15 이하
매수청산
스토캐스틱 (80선이탈 or 80선 이상에서 데드크로스) or
macd기반스토캐스틱 95 이탈 or
단순이평 20선60선 둘 다 추세하락 그리고 60선>20선
매도
1)단순이평선 20선 < 60선 (외부변수) 혹은 20선이 하락추세 and
2)스토캐스틱 (80이탈 or 80 이상에서 골든크로스) and
3)macd기반스토캐스틱 85 이상
매도청산
스토캐스틱 (20선돌파 or 20선 이하에서 골든크로스) or
macd기반스토캐스틱 5돌파
input : short(9),Long(17);//MACD기간변수
input : MACDsto1(7),MACDsto2(4),MACDsto3(4);//MACD스토케스틱 기간변수
input : sto1(10),sto2(5),sto3(5);//일반스토케스틱 기간변수
input : P1(20),P2(60);//단순이평 기간변수
var : MACDV(0),HH(0),LL(0),MACDFastK(0),MACDstok(0),MACDstod(0);
var : mav1(0),mav2(0),stok(0),stod(0);
#MACD 스토케스틱
MACDV = MACD(short,long);
LL = Lowest(MACDV, MACDsto1);
HH = Highest(MACDV, MACDsto1);
MACDFastK = (MACDV - LL) / (HH - LL) * 100;
MACDStoK = ema(MACDFastK,MACDsto2);
MACDstoD = ema(MACDStoK,MACDsto3);
#단순이평
mav1 = ma(C,P1);
mav2 = ma(C,P2);
#일반 스토케스틱
stok = StochasticsK(sto1,sto2);
stod = StochasticsD(sto1,sto2,sto3);
if mav1 > mav2 and
(crossup(stok,20) or (crossup(stok,stod) and stok <= 20)) and
MACDstok <= 15 Then
buy("b");
if MarketPosition == 1 Then{
if(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) Then
exitlong("bx1");
if CrossDown(MACDstok,95) Then
exitlong("bx2");
}
if mav1 < mav2 and
(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) and
MACDstok >= 85 Then
sell("s");
if MarketPosition == -1 Then{
if(CrossUp(stok,20) or (CrossUp(stok,stod) and stok <= 20)) Then
ExitShort("sx1");
if CrossUp(MACDstok,5) Then
ExitShort("sx2");
}
즐거운 하루되세요
답변 1
예스스탁 예스스탁 답변
2016-12-26 08:57:50
안녕하세요
예스스탁입니다.
input : short(9),Long(17);//MACD기간변수
input : MACDsto1(7),MACDsto2(4),MACDsto3(4);//MACD스토케스틱 기간변수
input : sto1(10),sto2(5),sto3(5);//일반스토케스틱 기간변수
input : P1(20),P2(60);//단순이평 기간변수
var : MACDV(0),HH(0),LL(0),MACDFastK(0),MACDstok(0),MACDstod(0);
var : mav1(0),mav2(0),stok(0),stod(0);
#MACD 스토케스틱
MACDV = MACD(short,long);
LL = Lowest(MACDV, MACDsto1);
HH = Highest(MACDV, MACDsto1);
MACDFastK = (MACDV - LL) / (HH - LL) * 100;
MACDStoK = ema(MACDFastK,MACDsto2);
MACDstoD = ema(MACDStoK,MACDsto3);
#단순이평
mav1 = ma(C,P1);
mav2 = ma(C,P2);
#일반 스토케스틱
stok = StochasticsK(sto1,sto2);
stod = StochasticsD(sto1,sto2,sto3);
if (mav1 > mav2 or mav1 > mav1[1]) and
(crossup(stok,20) or (crossup(stok,stod) and stok <= 20)) and
MACDstok <= 15 Then
buy("b");
if MarketPosition == 1 Then{
if(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) Then
exitlong("bx1");
if CrossDown(MACDstok,95) Then
exitlong("bx2");
if mav1 < mav1[1] and mav2 < mav2[1] and mav1 < mav2 Then
exitlong("bx3");
}
if (mav1 < mav2 or mav1 < mav1[1]) and
(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) and
MACDstok >= 85 Then
sell("s");
if MarketPosition == -1 Then{
if(CrossUp(stok,20) or (CrossUp(stok,stod) and stok <= 20)) Then
ExitShort("sx1");
if CrossUp(MACDstok,5) Then
ExitShort("sx2");
}
즐거운 하루되세요
> 짱구아빠1234 님이 쓴 글입니다.
> 제목 : 수식 부탁 드리겠습니다
> 만들어주신 수식에 일부 수정 부탁드립니다 감사합니다
수정 및 추가내용은 매수1번 매도1번 매수청산3번입니다
매수
1)단순이평선 20선 > 60선 (외부변수) 혹은 20선이 상승추세 and
2)스토캐스틱 (20돌파 or 20 이하에서 골든크로스) and
3)macd기반스토캐스틱 15 이하
매수청산
스토캐스틱 (80선이탈 or 80선 이상에서 데드크로스) or
macd기반스토캐스틱 95 이탈 or
단순이평 20선60선 둘 다 추세하락 그리고 60선>20선
매도
1)단순이평선 20선 < 60선 (외부변수) 혹은 20선이 하락추세 and
2)스토캐스틱 (80이탈 or 80 이상에서 골든크로스) and
3)macd기반스토캐스틱 85 이상
매도청산
스토캐스틱 (20선돌파 or 20선 이하에서 골든크로스) or
macd기반스토캐스틱 5돌파
input : short(9),Long(17);//MACD기간변수
input : MACDsto1(7),MACDsto2(4),MACDsto3(4);//MACD스토케스틱 기간변수
input : sto1(10),sto2(5),sto3(5);//일반스토케스틱 기간변수
input : P1(20),P2(60);//단순이평 기간변수
var : MACDV(0),HH(0),LL(0),MACDFastK(0),MACDstok(0),MACDstod(0);
var : mav1(0),mav2(0),stok(0),stod(0);
#MACD 스토케스틱
MACDV = MACD(short,long);
LL = Lowest(MACDV, MACDsto1);
HH = Highest(MACDV, MACDsto1);
MACDFastK = (MACDV - LL) / (HH - LL) * 100;
MACDStoK = ema(MACDFastK,MACDsto2);
MACDstoD = ema(MACDStoK,MACDsto3);
#단순이평
mav1 = ma(C,P1);
mav2 = ma(C,P2);
#일반 스토케스틱
stok = StochasticsK(sto1,sto2);
stod = StochasticsD(sto1,sto2,sto3);
if mav1 > mav2 and
(crossup(stok,20) or (crossup(stok,stod) and stok <= 20)) and
MACDstok <= 15 Then
buy("b");
if MarketPosition == 1 Then{
if(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) Then
exitlong("bx1");
if CrossDown(MACDstok,95) Then
exitlong("bx2");
}
if mav1 < mav2 and
(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) and
MACDstok >= 85 Then
sell("s");
if MarketPosition == -1 Then{
if(CrossUp(stok,20) or (CrossUp(stok,stod) and stok <= 20)) Then
ExitShort("sx1");
if CrossUp(MACDstok,5) Then
ExitShort("sx2");
}
즐거운 하루되세요
다음글
이전글