커뮤니티
문의드립니다.
2014-04-08 09:15:49
182
글번호 74220
예스글로벌에서의 아래지표는 이동평균을 매일처럼 갱신하는 산식입니다.
1. 월요일마다 갱신하는 지표로 만들어주시면 감사하겠습니다. 즉, 월요일아침에 0에서 시작하는 방식으로 말입니다.
2.Data2에도 적용가능하도록 해주시면 감사드립니다.
늘 감사드립니다.
Input : Period1(5),Period2(20),Period3(60),Period4(120),Period5(240);
if dayindex <=0 then{
value1 = ema(C,Period1);
value2 = ema(C,Period2);
value3 = ema(C,Period3);
value4 = ema(C,Period4);
value5 = ema(C,Period5);
}
Value6 = ema(C,Period1)-Value1;
Value7 = ema(C,Period2)-Value2;
Value8 = ema(C,Period3)-Value3;
Value9 = ema(C,Period4)-Value4;
Value10 = ema(C,Period5)-Value5;
Plot1(value6, "지수이동평균1_dayindex");
Plot2(value7, "지수이동평균2_dayindex");
Plot3(value8, "지수이동평균3_dayindex");
Plot4(value9, "지수이동평균4_dayindex");
Plot5(value10, "지수이동평균5_dayindex");
답변 1
예스스탁 예스스탁 답변
2014-04-08 14:15:47
안녕하세요
예스스탁입니다.
1.
Input : Period1(5),Period2(20),Period3(60),Period4(120),Period5(240);
if DayOfWeek(sdate) < DayOfWeek(sdate[1]) then{
value1 = ema(C,Period1);
value2 = ema(C,Period2);
value3 = ema(C,Period3);
value4 = ema(C,Period4);
value5 = ema(C,Period5);
}
Value6 = ema(C,Period1)-Value1;
Value7 = ema(C,Period2)-Value2;
Value8 = ema(C,Period3)-Value3;
Value9 = ema(C,Period4)-Value4;
Value10 = ema(C,Period5)-Value5;
Plot1(value6, "지수이동평균1_dayindex");
Plot2(value7, "지수이동평균2_dayindex");
Plot3(value8, "지수이동평균3_dayindex");
Plot4(value9, "지수이동평균4_dayindex");
Plot5(value10, "지수이동평균5_dayindex");
2.
Input : Period1(5),Period2(20),Period3(60),Period4(120),Period5(240);
var : ema1(0,data2),ema2(0,data2),ema3(0,data2),ema4(0,data2),ema5(0,data2);
var : val1(0,data2),val2(0,data2),val3(0,data2),val4(0,data2),val5(0,data2);
var : val6(0,data2),val7(0,data2),val8(0,data2),val9(0,data2),val10(0,data2);
ema1 = data1(ema(C,Period1));
ema2 = data1(ema(C,Period2));
ema3 = data1(ema(C,Period3));
ema4 = data1(ema(C,Period4));
ema5 = data1(ema(C,Period5));
if DayOfWeek(sdate) < DayOfWeek(sdate[1]) then{
val1 = ema1;
val2 = ema2;
val3 = ema3;
val4 = ema4;
val5 = ema5;
}
Val6 = ema1-Val1;
Val7 = ema2-Val2;
Val8 = ema3-Val3;
Val9 = ema4-Val4;
Val10 =ema5-Val5;
Plot1(val6, "지수이동평균1_dayindex");
Plot2(val7, "지수이동평균2_dayindex");
Plot3(val8, "지수이동평균3_dayindex");
Plot4(val9, "지수이동평균4_dayindex");
Plot5(val10, "지수이동평균5_dayindex");
즐거운 하루되세요
> 예스매니아 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 예스글로벌에서의 아래지표는 이동평균을 매일처럼 갱신하는 산식입니다.
1. 월요일마다 갱신하는 지표로 만들어주시면 감사하겠습니다. 즉, 월요일아침에 0에서 시작하는 방식으로 말입니다.
2.Data2에도 적용가능하도록 해주시면 감사드립니다.
늘 감사드립니다.
Input : Period1(5),Period2(20),Period3(60),Period4(120),Period5(240);
if dayindex <=0 then{
value1 = ema(C,Period1);
value2 = ema(C,Period2);
value3 = ema(C,Period3);
value4 = ema(C,Period4);
value5 = ema(C,Period5);
}
Value6 = ema(C,Period1)-Value1;
Value7 = ema(C,Period2)-Value2;
Value8 = ema(C,Period3)-Value3;
Value9 = ema(C,Period4)-Value4;
Value10 = ema(C,Period5)-Value5;
Plot1(value6, "지수이동평균1_dayindex");
Plot2(value7, "지수이동평균2_dayindex");
Plot3(value8, "지수이동평균3_dayindex");
Plot4(value9, "지수이동평균4_dayindex");
Plot5(value10, "지수이동평균5_dayindex");
다음글
이전글