커뮤니티
문의드립니다.
2014-02-09 02:40:05
131
글번호 72352
매번 번거롭고 귀찮은 질문을 드려도 성심성의껏 작성해주셔서 너무 감사드립니다.
다시한번 귀찮은 부탁드리겠습니다.
1. 스토캐스틱지표를
(1) 주봉을 분봉에서 볼수 있게
(2) 일봉을 분봉에서 볼수 있게
(3) 시간봉을 분봉에서 볼수 있게
2. willim'R 지표를
(1) 주봉을 분봉에서 볼수 있게
(2) 일봉을 분봉에서 볼수 있게
(3) 시간봉을 분봉에서 볼수 있게
해주시면 감사하겠습니다.
매번 번거롭게 해드려서 죄송합니다.
답변 1
예스스탁 예스스탁 답변
2014-02-10 14:50:13
안녕하세요
예스스탁입니다.
1 스토케스틱
1-(1) 주봉
input : StoPeriod(10), StoPeriod1(6), StoPeriod2(6);
var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0);
var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0);
Array : HH[50](0),LL[50](0);
if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 49{
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
highVal = HH[0];
lowVal = LL[0];
for count = 0 to StoPeriod-1 {
if HH[count] > highVal then
highVal = HH[count];
if LL[count] < lowVal then
lowVal = LL[count];
}
StoFastK = (C-lowVal)/(highVal-lowVal)*100;
#### Slow StochasticsK ####
Ep = 2/(StoPeriod1+1);
if DINDEX >= StoPeriod and (date != date[1] or var1 < var1[1]) then {
DINDEX = DINDEX + 1;
PreStoK = StoK[1];
}
if DINDEX <= 1 then
StoK = StoFastK ;
else
StoK = StoFastK * EP + PreStoK * (1-EP);
#### Slow StochasticsD ####
Ep1 = 2/(StoPeriod2+1);
if date != date[1] or var1 < var1[1] then {
DINDEX = DINDEX + 1;
PreStoD = StoD[1];
}
if DINDEX <= 1 then
StoD = StoK ;
else
StoD = StoK * EP1 + PreStoD * (1-EP1);
plot1(StoK);
plot2(StoD);
PlotBaseLine1(20);
PlotBaseLine2(80);
1-(2) 일봉
input : Period(10), Period1(5), Period2(5);
var : cnt(0), highVal(0), lowVal(0), FK(0), SK(0), SD(0);
var : Ep1(0), Ep2(0), PreSK(0), PreSD(0);
#N일간 최고가 및 최저가
highVal = dayhigh(0);
lowVal = daylow(0);
for cnt = 0 to Period-1 {
if dayHigh(cnt) > highVal then
highVal = dayhigh(cnt);
if dayLow(cnt) < lowVal then
lowVal = dayLow(cnt);
}
#Fast StochasticsK
fK = (C-lowVal)/(highVal-lowVal)*100;
#Slow StochasticsK / Slow StochasticsD
Ep1 = 2/(Period1+1);
Ep2 = 2/(Period2+1);
if date != date[1] then {
PreSK = SK[1];
PreSD = SD[1];
}
SK = FK * EP1 + PreSK * (1-EP1);
SD = SK * EP2 + PreSD * (1-EP2);
plot1(SK,"일봉 SlowK");
plot2(SD,"일봉 SlowD");
PlotBaseLine1(20);
PlotBaseLine2(80);
1-(2) 타분봉
input : Atime(60),StoPeriod(10), StoPeriod1(6), StoPeriod2(6);
var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0);
var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0);
Array : HH[50](0),LL[50](0);
var1 = TimeToMinutes(stime)%Atime;
if dayindex == 0 or (var1 < var1[1] and stime > stime[1]) Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 49{
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
highVal = HH[0];
lowVal = LL[0];
for count = 0 to StoPeriod-1 {
if HH[count] > highVal then
highVal = HH[count];
if LL[count] < lowVal then
lowVal = LL[count];
}
StoFastK = (C-lowVal)/(highVal-lowVal)*100;
#### Slow StochasticsK ####
Ep = 2/(StoPeriod1+1);
if DINDEX >= StoPeriod and (date != date[1] or var1 < var1[1]) then {
DINDEX = DINDEX + 1;
PreStoK = StoK[1];
}
if DINDEX <= 1 then
StoK = StoFastK ;
else
StoK = StoFastK * EP + PreStoK * (1-EP);
#### Slow StochasticsD ####
Ep1 = 2/(StoPeriod2+1);
if date != date[1] or var1 < var1[1] then {
DINDEX = DINDEX + 1;
PreStoD = StoD[1];
}
if DINDEX <= 1 then
StoD = StoK ;
else
StoD = StoK * EP1 + PreStoD * (1-EP1);
plot1(StoK);
plot2(StoD);
PlotBaseLine1(20);
PlotBaseLine2(80);
2.willim'R
2-(1) 주봉
Input : Period(14);
Var : WR(0),cnt(0);
Array : HH[50](0),LL[50](0);
if DayOfWeek(sdate) < DayOfWeek(sdate[1]) Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 49{
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
if HH[Period] > 0 Then{
value1 = HH[0];
value2 = LL[0];
for cnt = 0 to Period-1{
if HH[cnt] > value1 Then
value1 = HH[cnt];
if LL[cnt] < value2 Then
value2 = LL[cnt];
}
WR = (value1 - Close) / (value1 - value2) * (-100);
plot1(WR);
}
2-(2) 일봉
Input : Period(14);
Var : WR(0),cnt(0);
value1 = DayHigh(0);
value2 = dayhigh(0);
for cnt = 0 to Period-1{
if dayhigh(cnt) > value1 Then
value1 = dayhigh(cnt);
if daylow(cnt) < value2 Then
value2 = daylow(cnt);
}
WR = (value1 - Close) / (value1 - value2) * (-100);
plot1(WR);
2-(3) 타분봉
Input : Atime(60),Period(14);
Var : WR(0),cnt(0);
Array : HH[50](0),LL[50](0);
var1 = TimeToMinutes(stime)%Atime;
if dayindex == 0 or (var1 < var1[1] and stime > stime[1]) Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 49{
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] Then
HH[0] = H;
if L < LL[0] Then
LL[0] = L;
if HH[Period] > 0 Then{
value1 = HH[0];
value2 = LL[0];
for cnt = 0 to Period-1{
if HH[cnt] > value1 Then
value1 = HH[cnt];
if LL[cnt] < value2 Then
value2 = LL[cnt];
}
WR = (value1 - Close) / (value1 - value2) * (-100);
}
plot1(WR);
즐거운 하루되세요
> 예스매니아 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 매번 번거롭고 귀찮은 질문을 드려도 성심성의껏 작성해주셔서 너무 감사드립니다.
다시한번 귀찮은 부탁드리겠습니다.
1. 스토캐스틱지표를
(1) 주봉을 분봉에서 볼수 있게
(2) 일봉을 분봉에서 볼수 있게
(3) 시간봉을 분봉에서 볼수 있게
2. willim'R 지표를
(1) 주봉을 분봉에서 볼수 있게
(2) 일봉을 분봉에서 볼수 있게
(3) 시간봉을 분봉에서 볼수 있게
해주시면 감사하겠습니다.
매번 번거롭게 해드려서 죄송합니다.