커뮤니티
문의드립니다
2016-11-20 05:54:08
126
글번호 104168
1) input : P1(9),P2(13),P3(18),P4(26);
Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0),X2(0),RCI2(0),X3(0),RCI3(0),X4(0),RCI4(0);
Array : VALUE1[50](0),VALUE2[50](0),VALUE3[50](0),VALUE4[50](0),NTHVALUE[50](0);
for cnt = 0 to 49{
VALUE1[cnt] = C[cnt];
VALUE2[cnt] = C[cnt];
VALUE3[cnt] = C[cnt];
VALUE4[cnt] = C[cnt];
}
###############################################
For Nth = 0 to P1-1 {
tempmax = -99999999;
For cnt = 0 to P1-1{
if VALUE1[cnt] > tempmax then{
tempmax = VALUE1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to P1-1{
X1 = X1+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI1 = (1-(6*X1)/(P1*(P1^2-1)))*100;
###############################################
For Nth = 0 to P2-1 {
tempmax = -99999999;
For cnt = 0 to P2-1{
if value2[cnt] > tempmax then{
tempmax = value2[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE2[tempIndex] = -99999999;
}
X2 = 0;
for cnt = 0 to P2-1{
X2 = X2+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI2 = (1-(6*X2)/(P2*(P2^2-1)))*100;
###############################################
For Nth = 0 to P3-1 {
tempmax = -99999999;
For cnt = 0 to P3-1{
if value3[cnt] > tempmax then{
tempmax = value3[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE3[tempIndex] = -99999999;
}
X3 = 0;
for cnt = 0 to P3-1{
X3 = X3+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI3 = (1-(6*X3)/(P3*(P3^2-1)))*100;
###############################################
For Nth = 0 to P4-1 {
tempmax = -99999999;
For cnt = 0 to P4-1{
if value4[cnt] > tempmax then{
tempmax = value4[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE4[tempIndex] = -99999999;
}
X4 = 0;
for cnt = 0 to P4-1{
X4 = X4+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI4 = (1-(6*X4)/(P4*(P4^2-1)))*100;
plot1(RCI1,"RCI1",iff(RCI1>RCI1[1],MAGENTA,GREEN));
plot2(RCI2,"RCI2",iff(RCI2>RCI2[1],MAGENTA,GREEN));
plot3(RCI3,"RCI3",iff(RCI3>RCI3[1],MAGENTA,GREEN));
plot4(RCI4,"RCI4",iff(RCI4>RCI4[1],MAGENTA,GREEN));
PlotBaseLine1(100);
PlotBaseLine2(-100); 참조데이터로 이용할려고 합니다 데이터로 수정부탁드립니다
2)Input : Period(5), Period1(3), Period2(3);
var : StoK(0,data2),StoD(0,data2);
StoK = data2(StochasticsK(Period,Period1));
StoD = data2(StochasticsD(Period,Period1,Period2));
Plot1(StoK, "StochasticsK");
Plot2(StoD, "StochasticsD");
PlotBaseLine1(20, "기준선20");
PlotBaseLine2(80, "기준선80");
상승시 레드색 하락시블루색 부탁드립니다 ~~항상감사드립니다
답변 1
예스스탁 예스스탁 답변
2016-11-21 14:00:08
안녕하세요
예스스탁입니다.
1
input : P1(9),P2(13),P3(18),P4(26);
Var : CC(0,data2),cnt(0,data2),Nth(0,data2),tempmax(0,data2), tempindex(0,data2);
var : X1(0,data2),RCI1(0,data2),X2(0,data2),RCI2(0,data2),X3(0,data2),RCI3(0,data2),X4(0,data2),RCI4(0,data2);
Array : VAL1[50](0,data2),VAL2[50](0,data2),VAL3[50](0,data2),VAL4[50](0,data2),NTHVALUE[50](0,data2);
CC = data2(c);
for cnt = 0 to 49{
VAL1[cnt] = CC[cnt];
VAL2[cnt] = CC[cnt];
VAL3[cnt] = CC[cnt];
VAL4[cnt] = CC[cnt];
}
###############################################
For Nth = 0 to P1-1 {
tempmax = -99999999;
For cnt = 0 to P1-1{
if VAL1[cnt] > tempmax then{
tempmax = VAL1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VAL1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to P1-1{
X1 = X1+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI1 = (1-(6*X1)/(P1*(P1^2-1)))*100;
###############################################
For Nth = 0 to P2-1 {
tempmax = -99999999;
For cnt = 0 to P2-1{
if VAL2[cnt] > tempmax then{
tempmax = VAL2[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VAL2[tempIndex] = -99999999;
}
X2 = 0;
for cnt = 0 to P2-1{
X2 = X2+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI2 = (1-(6*X2)/(P2*(P2^2-1)))*100;
###############################################
For Nth = 0 to P3-1 {
tempmax = -99999999;
For cnt = 0 to P3-1{
if VAL3[cnt] > tempmax then{
tempmax = VAL3[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VAL3[tempIndex] = -99999999;
}
X3 = 0;
for cnt = 0 to P3-1{
X3 = X3+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI3 = (1-(6*X3)/(P3*(P3^2-1)))*100;
###############################################
For Nth = 0 to P4-1 {
tempmax = -99999999;
For cnt = 0 to P4-1{
if VAL4[cnt] > tempmax then{
tempmax = VAL4[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VAL4[tempIndex] = -99999999;
}
X4 = 0;
for cnt = 0 to P4-1{
X4 = X4+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI4 = (1-(6*X4)/(P4*(P4^2-1)))*100;
plot1(RCI1,"RCI1",iff(RCI1>RCI1[1],MAGENTA,GREEN));
plot2(RCI2,"RCI2",iff(RCI2>RCI2[1],MAGENTA,GREEN));
plot3(RCI3,"RCI3",iff(RCI3>RCI3[1],MAGENTA,GREEN));
plot4(RCI4,"RCI4",iff(RCI4>RCI4[1],MAGENTA,GREEN));
PlotBaseLine1(100);
PlotBaseLine2(-100);
2
Input : Period(5), Period1(3), Period2(3);
var : StoK(0,data2),StoD(0,data2);
StoK = data2(StochasticsK(Period,Period1));
StoD = data2(StochasticsD(Period,Period1,Period2));
Plot1(StoK, "StochasticsK",iff(StoK>StoK[1],red,blue));
Plot2(StoD, "StochasticsD",iff(StoD>StoD[1],red,blue));
PlotBaseLine1(20, "기준선20");
PlotBaseLine2(80, "기준선80");
즐거운 하루되세요
> 장군 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 1) input : P1(9),P2(13),P3(18),P4(26);
Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0),X2(0),RCI2(0),X3(0),RCI3(0),X4(0),RCI4(0);
Array : VALUE1[50](0),VALUE2[50](0),VALUE3[50](0),VALUE4[50](0),NTHVALUE[50](0);
for cnt = 0 to 49{
VALUE1[cnt] = C[cnt];
VALUE2[cnt] = C[cnt];
VALUE3[cnt] = C[cnt];
VALUE4[cnt] = C[cnt];
}
###############################################
For Nth = 0 to P1-1 {
tempmax = -99999999;
For cnt = 0 to P1-1{
if VALUE1[cnt] > tempmax then{
tempmax = VALUE1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to P1-1{
X1 = X1+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI1 = (1-(6*X1)/(P1*(P1^2-1)))*100;
###############################################
For Nth = 0 to P2-1 {
tempmax = -99999999;
For cnt = 0 to P2-1{
if value2[cnt] > tempmax then{
tempmax = value2[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE2[tempIndex] = -99999999;
}
X2 = 0;
for cnt = 0 to P2-1{
X2 = X2+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI2 = (1-(6*X2)/(P2*(P2^2-1)))*100;
###############################################
For Nth = 0 to P3-1 {
tempmax = -99999999;
For cnt = 0 to P3-1{
if value3[cnt] > tempmax then{
tempmax = value3[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE3[tempIndex] = -99999999;
}
X3 = 0;
for cnt = 0 to P3-1{
X3 = X3+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI3 = (1-(6*X3)/(P3*(P3^2-1)))*100;
###############################################
For Nth = 0 to P4-1 {
tempmax = -99999999;
For cnt = 0 to P4-1{
if value4[cnt] > tempmax then{
tempmax = value4[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE4[tempIndex] = -99999999;
}
X4 = 0;
for cnt = 0 to P4-1{
X4 = X4+ABS((cnt+1)-NTHVALUE[cnt])^2;
}
RCI4 = (1-(6*X4)/(P4*(P4^2-1)))*100;
plot1(RCI1,"RCI1",iff(RCI1>RCI1[1],MAGENTA,GREEN));
plot2(RCI2,"RCI2",iff(RCI2>RCI2[1],MAGENTA,GREEN));
plot3(RCI3,"RCI3",iff(RCI3>RCI3[1],MAGENTA,GREEN));
plot4(RCI4,"RCI4",iff(RCI4>RCI4[1],MAGENTA,GREEN));
PlotBaseLine1(100);
PlotBaseLine2(-100); 참조데이터로 이용할려고 합니다 데이터로 수정부탁드립니다
2)Input : Period(5), Period1(3), Period2(3);
var : StoK(0,data2),StoD(0,data2);
StoK = data2(StochasticsK(Period,Period1));
StoD = data2(StochasticsD(Period,Period1,Period2));
Plot1(StoK, "StochasticsK");
Plot2(StoD, "StochasticsD");
PlotBaseLine1(20, "기준선20");
PlotBaseLine2(80, "기준선80");
상승시 레드색 하락시블루색 부탁드립니다 ~~항상감사드립니다