커뮤니티
문의드립니다
2014-04-05 08:24:09
222
글번호 74159
1.
var1 = wma(c,5);
var2 = wma(c,20);
if crossup(var1,var2) then
value1 = var1;
if CrossDown(var1,var2) Then
value1 = var1;
var3 = var1-value1;
if var3 > 0 Then{
plot1(var1,"선1");
plot2(value1-(var3),"선2");
}
else{
plot1(var1,"선1");
plot2(value1+abs(var3),"선2");
}
2.
var : V_J1(0),V_J2(0);
var : sumGap(0), gap(0), GO(0), GH(0), GL(0), GC(0);
if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = Open-Close[1]; // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = O - sumGap;// 갭보정 시가
GH = H - sumGap;// 갭보정 고가
GL = L - sumGap;// 갭보정 저가
GC = C - sumGap; // 갭보정 종가
V_j1 = wma(C,120)/(wma(C,60)/100);
V_j2 = wma(C,60)/(wma(C,120)/100);
Plot1(wma(GC,20)/(wma(GC,5)/100),"단기-");
Plot2(wma(GC,5)/(wma(GC,20)/100),"단기+");
Plot3(wma(GC,60)/(wma(GC,20)/100),"중기-");
Plot4(wma(GC,20)/(wma(GC,60)/100),"중기+");
Plot5(V_j1,"장기-");
Plot6(V_j2,"장기+");
/*
If V_J1 < V_J2 Then
Plot3(V_J2-(V_J2-V_J1));
Else
Plot4(V_J2);
3.
Input : Period(20), D(2);
var : BBdown(0),BBUp(0),BandB(0);
BBDown = BollBandDown(Period,D);
BBUp = BollBandUp(Period,D);
BandB = ((C-BBDown)/(BBUp-BBDown))*100;
Plot1(BandB, "Band %b");
PlotBaseLine1(10, "기준선10");
PlotBaseLine2(90, "기준선90");
4.
inputs:
Price( Close ),
BaseLength( 10 ),
ArithOrGeom_1or2( 1 ),
IncrementOrMultiplier( 10 ),
FastColor( Yellow ),
SlowColor( Red ) ;
variables:
Counter( 0 ) ;
arrays:
Length[8]( 0 ),
SmoothingFactor[8]( 0 ),
XMA[8]( 0 ),
Color[8]( 0 ) ;
if CurrentBar == 1 then
begin
Length[1] = BaseLength ;
SmoothingFactor[1] = 2 / ( Length[1] + 1 ) ;
XMA[1] = Price ;
Color[1] = RGB(255,0,0) ;
for Counter = 1 to 7
begin
if ArithOrGeom_1or2 == 1 then
Length[ Counter + 1 ] = Length[Counter] + IncrementOrMultiplier ;
else
Length[ Counter + 1 ] = Length[Counter] * IncrementOrMultiplier ;
SmoothingFactor[ Counter + 1 ] = 2 / ( Length[ Counter + 1 ] + 1 ) ;
XMA[ Counter + 1 ] = Price ;
Color[ Counter + 1 ] = RGB(255,int((255/8)*(Counter + 1)),0);
end ;
end
else
for Counter = 1 to 8
begin
XMA[Counter] = XMA[Counter][1] + SmoothingFactor[Counter] * ( Price - XMA[Counter][1] ) ;
end ;
Plot1( XMA[1], "XMA1", Color[1] ) ;
Plot2( XMA[2], "XMA2", Color[2] ) ;
Plot3( XMA[3], "XMA3", Color[3] ) ;
Plot4( XMA[4], "XMA4", Color[4] ) ;
Plot5( XMA[5], "XMA5", Color[5] ) ;
Plot6( XMA[6], "XMA6", Color[6] ) ;
Plot7( XMA[7], "XMA7", Color[7] ) ;
Plot8( XMA[8], "XMA8", Color[8] ) ;
상기 1,2,3,4번을 모두 데이타2식으로 바꾸어 주세요
감사드립니다
답변 1
예스스탁 예스스탁 답변
2014-04-07 15:57:08
안녕하세요
예스스탁입니다.
1.
var : Wma1(0,data2),Wma2(0,data2),V3(0,data2),val1(0,data2);
Wma1 = data2(wma(c,5));
Wma2 = data2(wma(c,20));
if crossup(Wma1,Wma2) then
val1 = Wma1;
if CrossDown(Wma1,Wma2) Then
val1 = Wma1;
v3 = Wma1-val1;
if v3 > 0 Then{
plot1(Wma1,"선1");
plot2(val1-(v3),"선2");
}
else{
plot1(Wma1,"선1");
plot2(val1+abs(v3),"선2");
}
2.
var : V_J1(0),V_J2(0);
var : sumGap(0), gap(0), GO(0), GH(0), GL(0), GC(0);
if data2(date!=date[1]) then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = data2(Open-Close[1]); // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = data2(O - sumGap);// 갭보정 시가
GH = data2(H - sumGap);// 갭보정 고가
GL = data2(L - sumGap);// 갭보정 저가
GC = data2(C - sumGap); // 갭보정 종가
V_j1 = data2(wma(C,120)/(wma(C,60)/100));
V_j2 = data2(wma(C,60)/(wma(C,120)/100));
Plot1(data2(wma(GC,20)/(wma(GC,5)/100)),"단기-");
Plot2(data2(wma(GC,5)/(wma(GC,20)/100)),"단기+");
Plot3(data2(wma(GC,60)/(wma(GC,20)/100)),"중기-");
Plot4(data2(wma(GC,20)/(wma(GC,60)/100)),"중기+");
Plot5(V_j1,"장기-");
Plot6(V_j2,"장기+");
/*
If V_J1 < V_J2 Then
Plot3(V_J2-(V_J2-V_J1));
Else
Plot4(V_J2);
3.
Input : Period(20), D(2);
var : BBdown(0,data2),BBUp(0,data2),BandB(0,data2);
BBDown = data2(BollBandDown(Period,D));
BBUp = data2(BollBandUp(Period,D));
BandB = data2(((C-BBDown)/(BBUp-BBDown))*100);
Plot1(BandB, "Band %b");
PlotBaseLine1(10, "기준선10");
PlotBaseLine2(90, "기준선90");
4.
inputs:BaseLength( 10 ),ArithOrGeom_1or2( 1 ),IncrementOrMultiplier( 10 ), FastColor( Yellow ),SlowColor( Red ) ;
var: Counter(0,data2) ;
arrays: Length[8](0,data2),SmoothingFactor[8](0,data2),XMA[8](0,data2),Color[8](0,data2) ;
if data2(CurrentBar == 1) then
begin
Length[1] = BaseLength ;
SmoothingFactor[1] = 2 / ( Length[1] + 1 ) ;
XMA[1] = data2(c) ;
Color[1] = RGB(255,0,0) ;
for Counter = 1 to 7
begin
if ArithOrGeom_1or2 == 1 then
Length[ Counter + 1 ] = Length[Counter] + IncrementOrMultiplier ;
else
Length[ Counter + 1 ] = Length[Counter] * IncrementOrMultiplier ;
SmoothingFactor[ Counter + 1 ] = 2 / ( Length[ Counter + 1 ] + 1 ) ;
XMA[ Counter + 1 ] = data2(c) ;
Color[ Counter + 1 ] = RGB(255,int((255/8)*(Counter + 1)),0);
end ;
end
else
for Counter = 1 to 8
begin
XMA[Counter] = XMA[Counter][1] + SmoothingFactor[Counter] * ( data2(c) - XMA[Counter][1] ) ;
end ;
Plot1( XMA[1], "XMA1", Color[1] ) ;
Plot2( XMA[2], "XMA2", Color[2] ) ;
Plot3( XMA[3], "XMA3", Color[3] ) ;
Plot4( XMA[4], "XMA4", Color[4] ) ;
Plot5( XMA[5], "XMA5", Color[5] ) ;
Plot6( XMA[6], "XMA6", Color[6] ) ;
Plot7( XMA[7], "XMA7", Color[7] ) ;
Plot8( XMA[8], "XMA8", Color[8] ) ;
즐거운 하루되세요
> 타이거88 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 1.
var1 = wma(c,5);
var2 = wma(c,20);
if crossup(var1,var2) then
value1 = var1;
if CrossDown(var1,var2) Then
value1 = var1;
var3 = var1-value1;
if var3 > 0 Then{
plot1(var1,"선1");
plot2(value1-(var3),"선2");
}
else{
plot1(var1,"선1");
plot2(value1+abs(var3),"선2");
}
2.
var : V_J1(0),V_J2(0);
var : sumGap(0), gap(0), GO(0), GH(0), GL(0), GC(0);
if date!=date[1] then { // 날짜가 변경되는 봉에서(분봉에서 첫번째 봉)
gap = Open-Close[1]; // 일간갭
sumGap = sumGap+gap; // 일간갭 누적
}
GO = O - sumGap;// 갭보정 시가
GH = H - sumGap;// 갭보정 고가
GL = L - sumGap;// 갭보정 저가
GC = C - sumGap; // 갭보정 종가
V_j1 = wma(C,120)/(wma(C,60)/100);
V_j2 = wma(C,60)/(wma(C,120)/100);
Plot1(wma(GC,20)/(wma(GC,5)/100),"단기-");
Plot2(wma(GC,5)/(wma(GC,20)/100),"단기+");
Plot3(wma(GC,60)/(wma(GC,20)/100),"중기-");
Plot4(wma(GC,20)/(wma(GC,60)/100),"중기+");
Plot5(V_j1,"장기-");
Plot6(V_j2,"장기+");
/*
If V_J1 < V_J2 Then
Plot3(V_J2-(V_J2-V_J1));
Else
Plot4(V_J2);
3.
Input : Period(20), D(2);
var : BBdown(0),BBUp(0),BandB(0);
BBDown = BollBandDown(Period,D);
BBUp = BollBandUp(Period,D);
BandB = ((C-BBDown)/(BBUp-BBDown))*100;
Plot1(BandB, "Band %b");
PlotBaseLine1(10, "기준선10");
PlotBaseLine2(90, "기준선90");
4.
inputs:
Price( Close ),
BaseLength( 10 ),
ArithOrGeom_1or2( 1 ),
IncrementOrMultiplier( 10 ),
FastColor( Yellow ),
SlowColor( Red ) ;
variables:
Counter( 0 ) ;
arrays:
Length[8]( 0 ),
SmoothingFactor[8]( 0 ),
XMA[8]( 0 ),
Color[8]( 0 ) ;
if CurrentBar == 1 then
begin
Length[1] = BaseLength ;
SmoothingFactor[1] = 2 / ( Length[1] + 1 ) ;
XMA[1] = Price ;
Color[1] = RGB(255,0,0) ;
for Counter = 1 to 7
begin
if ArithOrGeom_1or2 == 1 then
Length[ Counter + 1 ] = Length[Counter] + IncrementOrMultiplier ;
else
Length[ Counter + 1 ] = Length[Counter] * IncrementOrMultiplier ;
SmoothingFactor[ Counter + 1 ] = 2 / ( Length[ Counter + 1 ] + 1 ) ;
XMA[ Counter + 1 ] = Price ;
Color[ Counter + 1 ] = RGB(255,int((255/8)*(Counter + 1)),0);
end ;
end
else
for Counter = 1 to 8
begin
XMA[Counter] = XMA[Counter][1] + SmoothingFactor[Counter] * ( Price - XMA[Counter][1] ) ;
end ;
Plot1( XMA[1], "XMA1", Color[1] ) ;
Plot2( XMA[2], "XMA2", Color[2] ) ;
Plot3( XMA[3], "XMA3", Color[3] ) ;
Plot4( XMA[4], "XMA4", Color[4] ) ;
Plot5( XMA[5], "XMA5", Color[5] ) ;
Plot6( XMA[6], "XMA6", Color[6] ) ;
Plot7( XMA[7], "XMA7", Color[7] ) ;
Plot8( XMA[8], "XMA8", Color[8] ) ;
상기 1,2,3,4번을 모두 데이타2식으로 바꾸어 주세요
감사드립니다