커뮤니티
부탁드립니다.
2017-01-24 01:31:54
112
글번호 106221
도움주심에 감사 드립니다.
다음수식을 참고로 시작시분에서 MACD값이 0에서 출발하는 수식이 가능한지요?
미리 감사 드립니다.
input:시작년도(2017),월(1),일(23),시작시분only(0800);
variables: VolumeValue( 0 ), MedPrice( 0 ), PV( 0 ),StartCalcDate(0),StartTime(0),
CumulativeVolume( 0 ), CumulativePV( 0 ), Started( false ), Denom( 0 ),
KeyCumVol( 0 ), KeyCumPV( 0 ), MidasValue( 0 ) ;
StartCalcDate=시작년도*10000+월*100+일;
StartTime=시작시분ONLY*100;
if Date >= StartCalcDate and Time >= StartTime then
begin
VolumeValue = iff( DataCompress < 1, Ticks, Volume ) ;
MedPrice = (H + L)/2 ;
PV = MedPrice * VolumeValue ;
CumulativeVolume = VolumeValue + CumulativeVolume ;
CumulativePV = PV + CumulativePV ;
end ;
if Started == false and ( ( Date >= StartCalcDate and
Time >= StartTime ) and ( ( Time[1] < StartTime or
Date[1] < StartCalcDate ) or Date[1] >
StartCalcDate ) ) then
begin
Started = true ;
Denom = 1 ;
KeyCumVol = CumulativeVolume ;
KeyCumPV = CumulativePV ;
end
else if Denom >= 1 then
Denom = CumulativeVolume - KeyCumVol ;
if Started then
begin
if Denom > 1 then
MidasValue = ( CumulativePV - KeyCumPV ) / Denom ;
else if Denom = 1 then MidasValue = MedPrice ;
Plot1( MidasValue, "Midas" ,lmagenta) ;
end ;
답변 1
예스스탁 예스스탁 답변
2017-01-24 17:10:42
안녕하세요
예스스탁입니다.
input:시작년도(2017),월(1),일(23),시작시분only(0800);
variables: VolumeValue( 0 ), MedPrice( 0 ), PV( 0 ),StartCalcDate(0),StartTime(0),
CumulativeVolume( 0 ), CumulativePV( 0 ), Started( false ), Denom( 0 ),
KeyCumVol( 0 ), KeyCumPV( 0 ), MidasValue( 0 ) ;
Input : Period1(12),Period2(26),Period3(9);
Var : Ep1(0), JISU1(0),Ep2(0), JISU2(0),Ep3(0),Jisu3(0);
var : MACDVal(0),MACDSig(0),ii(0);
Ep1 = 2/(Period1+1);
Ep2 = 2/(Period2+1);
Ep3 = 2/(Period3+1);
StartCalcDate=시작년도*10000+월*100+일;
StartTime=시작시분ONLY*100;
if Date >= StartCalcDate and Time >= StartTime then
begin
VolumeValue = iff( DataCompress < 1, Ticks, Volume ) ;
MedPrice = (H + L)/2 ;
PV = MedPrice * VolumeValue ;
CumulativeVolume = VolumeValue + CumulativeVolume ;
CumulativePV = PV + CumulativePV ;
end ;
if Started == false and ( ( Date >= StartCalcDate and
Time >= StartTime ) and ( ( Time[1] < StartTime or
Date[1] < StartCalcDate ) or Date[1] >
StartCalcDate ) ) then
begin
Started = true ;
Denom = 1 ;
KeyCumVol = CumulativeVolume ;
KeyCumPV = CumulativePV ;
end
else if Denom >= 1 then
Denom = CumulativeVolume - KeyCumVol ;
if Started then
begin
if Denom > 1 then
MidasValue = ( CumulativePV - KeyCumPV ) / Denom ;
else if Denom == 1 then MidasValue = MedPrice ;
#Plot1( MidasValue, "Midas" ,lmagenta) ;
ii = ii+1;
if ii <= 1 then {
JISU1 = MidasValue;
JISU2 = MidasValue;
MACDVal = JiSu1-Jisu2;
MACDsig = MACDVal;
}
else{
JISU1 = MidasValue * EP1 + JISU1[1] * (1-EP1);
JISU2 = MidasValue * EP2 + JISU2[1] * (1-EP2);
MACDVal = JiSu1-Jisu2;
MACDsig = MACDVal * EP3 + MACDsig[1] * (1-EP3);
}
plot1(MACDVal);
plot2(MACDsig);
PlotBaseLine1(0);
end;
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> 도움주심에 감사 드립니다.
다음수식을 참고로 시작시분에서 MACD값이 0에서 출발하는 수식이 가능한지요?
미리 감사 드립니다.
input:시작년도(2017),월(1),일(23),시작시분only(0800);
variables: VolumeValue( 0 ), MedPrice( 0 ), PV( 0 ),StartCalcDate(0),StartTime(0),
CumulativeVolume( 0 ), CumulativePV( 0 ), Started( false ), Denom( 0 ),
KeyCumVol( 0 ), KeyCumPV( 0 ), MidasValue( 0 ) ;
StartCalcDate=시작년도*10000+월*100+일;
StartTime=시작시분ONLY*100;
if Date >= StartCalcDate and Time >= StartTime then
begin
VolumeValue = iff( DataCompress < 1, Ticks, Volume ) ;
MedPrice = (H + L)/2 ;
PV = MedPrice * VolumeValue ;
CumulativeVolume = VolumeValue + CumulativeVolume ;
CumulativePV = PV + CumulativePV ;
end ;
if Started == false and ( ( Date >= StartCalcDate and
Time >= StartTime ) and ( ( Time[1] < StartTime or
Date[1] < StartCalcDate ) or Date[1] >
StartCalcDate ) ) then
begin
Started = true ;
Denom = 1 ;
KeyCumVol = CumulativeVolume ;
KeyCumPV = CumulativePV ;
end
else if Denom >= 1 then
Denom = CumulativeVolume - KeyCumVol ;
if Started then
begin
if Denom > 1 then
MidasValue = ( CumulativePV - KeyCumPV ) / Denom ;
else if Denom = 1 then MidasValue = MedPrice ;
Plot1( MidasValue, "Midas" ,lmagenta) ;
end ;