커뮤니티
문의드립니다
2012-01-30 00:33:51
370
글번호 47036
input : 분(30),Period(10), Period1(6), Period2(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[20](0),LL[20](0);
var1 = TimeToMinutes(stime)%분;
if dayindex == 0 or var1 < var1[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 19{
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;
#### 특정 구간의 고가 [highest(H,Period)] ####
highVal = HH[0];
for count = 0 to Period-1 {
if HH[count] > highVal then
highVal = HH[count];
}
#### 특정 구간의 저가 [lowest(L,Period)] ####
lowVal = LL[0];
for count = 0 to Period-1 {
if LL[count] < lowVal then
lowVal = LL[count];
}
#### Fast StochasticsK ####
StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100
#### Slow StochasticsK ####
Ep = 2/(Period1+1);
if DINDEX >= Period 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 StochasticsK ==> ema(Fast StochasticsK, Period1)
#### Slow StochasticsD ####
Ep1 = 2/(Period2+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); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2)
plot1(StoK);
plot2(StoD);
위에는 분봉에서 보는 30분의 스톡수식으로 여기 계시판에서 얻어서 활용하고 있습니다
위 수식의 강조 신호를 부탁드립니다
골드일때는 빨간색 데드일때는 파랑색으로 매번 바뀔 때 첫봉에만 캔들에 색이 보이고 80이상 과열권에선 어떤색색 20이하에서는 어떤색 각각 첫봉에만 보이고 꼬리는 제외하고 몸통에만 나오게 부탁드립니다
두번째 질문은 일반 스톡에서 80이상일때 항상 어떤색 20이하일때 항상 어떤색 ..80이상에서 음봉일때는 강조신호 안 나오고 20이하일때 양봉일때는 강조신호 안 나오고 꼬리빼고 몸통에만 나오게 부탁드립니다
세번째 질문은 위 첫번째와 두번째를 붙여서 하나의 수식으로 부탁드립니다
답변 1
예스스탁 예스스탁 답변
2012-01-30 15:38:19
안녕하세요
예스스탁입니다.
1.
질문의 하신 내용을 정확히 이해하지 못했습니다.
골드크로스와 데드크로스를 스토케스틱 20 이하, 20~80 사이, 80이상으로
분리했습니다. 각각에 원하시는 색을 지정해 주시면 됩니다.
input : 분(30),Period(10), Period1(6), Period2(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[20](0),LL[20](0);
var1 = TimeToMinutes(stime)%분;
if dayindex == 0 or var1 < var1[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 19{
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;
#### 특정 구간의 고가 [highest(H,Period)] ####
highVal = HH[0];
for count = 0 to Period-1 {
if HH[count] > highVal then
highVal = HH[count];
}
#### 특정 구간의 저가 [lowest(L,Period)] ####
lowVal = LL[0];
for count = 0 to Period-1 {
if LL[count] < lowVal then
lowVal = LL[count];
}
#### Fast StochasticsK ####
StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100
#### Slow StochasticsK ####
Ep = 2/(Period1+1);
if DINDEX >= Period 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 StochasticsK ==> ema(Fast StochasticsK, Period1)
#### Slow StochasticsD ####
Ep1 = 2/(Period2+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); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2)
if crossup(stok,stod) Then{#골드
if stok > 20 and stime < 80 Then#20~80
PlotPaintBar(c,o,"1",RED);
if stok < 20 Then#20 이하
PlotPaintBar(c,o,"1",RED);
if stok < 80 Then#80 이상
PlotPaintBar(c,o,"1",RED);
}
if CrossDown(stok,stod) Then{#데드
if stok > 20 and stime < 80 Then#20~80
PlotPaintBar(c,o,"1",blue);
if stok < 20 Then#20 이하
PlotPaintBar(c,o,"1",blue);
if stok < 80 Then#80 이상
PlotPaintBar(c,o,"1",blue);
}
2.
input : 분(30),Period(10), Period1(6), Period2(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[20](0),LL[20](0);
var1 = TimeToMinutes(stime)%분;
if dayindex == 0 or var1 < var1[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 19{
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;
#### 특정 구간의 고가 [highest(H,Period)] ####
highVal = HH[0];
for count = 0 to Period-1 {
if HH[count] > highVal then
highVal = HH[count];
}
#### 특정 구간의 저가 [lowest(L,Period)] ####
lowVal = LL[0];
for count = 0 to Period-1 {
if LL[count] < lowVal then
lowVal = LL[count];
}
#### Fast StochasticsK ####
StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100
#### Slow StochasticsK ####
Ep = 2/(Period1+1);
if DINDEX >= Period 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 StochasticsK ==> ema(Fast StochasticsK, Period1)
#### Slow StochasticsD ####
Ep1 = 2/(Period2+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); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2)
if stok >= 80 and !(C < O) Then# 80이상 음봉이 아닐때만
PlotPaintBar(c,o,"1",RED);
if stok <= 20 and !(C > O) Then# 20이하 양봉이 아닐때만
PlotPaintBar(c,o,"1",blue);
3. 1+2
input : 분(30),Period(10), Period1(6), Period2(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[20](0),LL[20](0);
var1 = TimeToMinutes(stime)%분;
if dayindex == 0 or var1 < var1[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 19{
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;
#### 특정 구간의 고가 [highest(H,Period)] ####
highVal = HH[0];
for count = 0 to Period-1 {
if HH[count] > highVal then
highVal = HH[count];
}
#### 특정 구간의 저가 [lowest(L,Period)] ####
lowVal = LL[0];
for count = 0 to Period-1 {
if LL[count] < lowVal then
lowVal = LL[count];
}
#### Fast StochasticsK ####
StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100
#### Slow StochasticsK ####
Ep = 2/(Period1+1);
if DINDEX >= Period 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 StochasticsK ==> ema(Fast StochasticsK, Period1)
#### Slow StochasticsD ####
Ep1 = 2/(Period2+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); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2)
if crossup(stok,stod) Then{#골드
if stok > 20 and stime < 80 Then#20~80
PlotPaintBar(c,o,"1",RED);
if stok < 20 Then#20 이하
PlotPaintBar(c,o,"1",RED);
if stok < 80 Then#80 이상
PlotPaintBar(c,o,"1",RED);
}
if CrossDown(stok,stod) Then{#데드
if stok > 20 and stime < 80 Then#20~80
PlotPaintBar(c,o,"1",blue);
if stok < 20 Then#20 이하
PlotPaintBar(c,o,"1",blue);
if stok < 80 Then#80 이상
PlotPaintBar(c,o,"1",blue);
}
if stok >= 80 and !(C < O) Then# 80이상 음봉이 아닐때만
PlotPaintBar(c,o,"1",RED);
if stok <= 20 and !(C > O) Then# 20이하 양봉이 아닐때만
PlotPaintBar(c,o,"1",blue);
즐거운 하루되세요
> cjfdk 님이 쓴 글입니다.
> 제목 : 문의드립니다
> input : 분(30),Period(10), Period1(6), Period2(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[20](0),LL[20](0);
var1 = TimeToMinutes(stime)%분;
if dayindex == 0 or var1 < var1[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 19{
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;
#### 특정 구간의 고가 [highest(H,Period)] ####
highVal = HH[0];
for count = 0 to Period-1 {
if HH[count] > highVal then
highVal = HH[count];
}
#### 특정 구간의 저가 [lowest(L,Period)] ####
lowVal = LL[0];
for count = 0 to Period-1 {
if LL[count] < lowVal then
lowVal = LL[count];
}
#### Fast StochasticsK ####
StoFastK = (C-lowVal)/(highVal-lowVal)*100; //Fast StochasticsK ==> (C-lowest(L,Period))/(highest(H,Period)-lowest(L,Period))*100
#### Slow StochasticsK ####
Ep = 2/(Period1+1);
if DINDEX >= Period 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 StochasticsK ==> ema(Fast StochasticsK, Period1)
#### Slow StochasticsD ####
Ep1 = 2/(Period2+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); //Slow StochasticsD ==> ema(Slow StochasticsK, Period2)
plot1(StoK);
plot2(StoD);
위에는 분봉에서 보는 30분의 스톡수식으로 여기 계시판에서 얻어서 활용하고 있습니다
위 수식의 강조 신호를 부탁드립니다
골드일때는 빨간색 데드일때는 파랑색으로 매번 바뀔 때 첫봉에만 캔들에 색이 보이고 80이상 과열권에선 어떤색색 20이하에서는 어떤색 각각 첫봉에만 보이고 꼬리는 제외하고 몸통에만 나오게 부탁드립니다
두번째 질문은 일반 스톡에서 80이상일때 항상 어떤색 20이하일때 항상 어떤색 ..80이상에서 음봉일때는 강조신호 안 나오고 20이하일때 양봉일때는 강조신호 안 나오고 꼬리빼고 몸통에만 나오게 부탁드립니다
세번째 질문은 위 첫번째와 두번째를 붙여서 하나의 수식으로 부탁드립니다
다음글