커뮤니티
문의드립니다.
2018-02-19 15:19:57
124
글번호 116694
매번 감사합니다.
1. 기타
시뮬레이션 차트에서 쓸 수 있는 식으로 변환 부탁드립니다. 혹시 eVWMA를 중심으로 상하단 볼린저밴드도 만들 수 있을까요?
inputs:
Price( Close ),
VolumeDivisor( 1 ),
N( 100000 ) ;
variables:
eVWMA( 0 ),
ScaledVol( 0 ),
VolDiff( 0 ),
Violation( false ) ;
if CurrentBar = 1 then
eVWMA = Price
else
begin
ScaledVol = Volume / VolumeDivisor ;
VolDiff = N - ScaledVol ;
if VolDiff < 0 and Violation = false then
Violation = true ;
if Violation = true then
eVWMA = eVWMA[1]
else
eVWMA = ( VolDiff * eVWMA[1] + ScaledVol * Price ) / N ;
end ;
Plot1( eVWMA ) ;
답변 1
예스스탁 예스스탁 답변
2018-02-20 10:12:15
안녕하세요
예스스탁입니다.
1.
inputs: VolumeDivisor( 1 ),N( 100000 ) ;
variables:eVWMA( 0 ),ScaledVol( 0 ),VolDiff( 0 ),Violation( false ) ;
if CurrentBar >= 1 then
eVWMA = c;
else
{
ScaledVol = Volume / VolumeDivisor ;
VolDiff = N - ScaledVol ;
if VolDiff < 0 and Violation == false then
Violation = true ;
if Violation == true then
eVWMA = eVWMA[1];
else
eVWMA = ( VolDiff * eVWMA[1] + ScaledVol * c ) / N ;
}
Plot1( eVWMA ) ;
2
inputs: VolumeDivisor( 1 ),N( 100000 ),P(20),Dv(2);
var :eVWMA( 0 ),ScaledVol( 0 ),VolDiff( 0 ),Violation( false ) ;
var : BBmd(0),BBup(0),BBdn(0),SumSqrt(0),Stdv(0),cnt(0);
if CurrentBar >= 1 then
eVWMA = c;
else
{
ScaledVol = Volume / VolumeDivisor ;
VolDiff = N - ScaledVol ;
if VolDiff < 0 and Violation == false then
Violation = true ;
if Violation == true then
eVWMA = eVWMA[1];
else
eVWMA = ( VolDiff * eVWMA[1] + ScaledVol * c ) / N ;
}
BBmd = eVWMA;
SumSqrt = 0;
For cnt = 0 To P - 1
{
SumSqrt = SumSqrt + (C[cnt] - BBmd)^2;
}
Stdv = SquareRoot(SumSqrt / P);
BBup = BBmd + (Dv * Stdv);
BBdn = BBmd - (Dv * Stdv);
Plot1(bbmd);
Plot2(bbup);
Plot3(bbdn);
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 매번 감사합니다.
1. 기타
시뮬레이션 차트에서 쓸 수 있는 식으로 변환 부탁드립니다. 혹시 eVWMA를 중심으로 상하단 볼린저밴드도 만들 수 있을까요?
inputs:
Price( Close ),
VolumeDivisor( 1 ),
N( 100000 ) ;
variables:
eVWMA( 0 ),
ScaledVol( 0 ),
VolDiff( 0 ),
Violation( false ) ;
if CurrentBar = 1 then
eVWMA = Price
else
begin
ScaledVol = Volume / VolumeDivisor ;
VolDiff = N - ScaledVol ;
if VolDiff < 0 and Violation = false then
Violation = true ;
if Violation = true then
eVWMA = eVWMA[1]
else
eVWMA = ( VolDiff * eVWMA[1] + ScaledVol * Price ) / N ;
end ;
Plot1( eVWMA ) ;
다음글
이전글