커뮤니티
문의드립니다
2011-09-28 11:25:31
634
글번호 43111
아래의 내용은 일봉에서 월봉을 불러온 내용입니다.
아래수식에서 주봉의 중간값을 불러오고자 합니다.
var2 = 주봉중간값 을 추가해 주십시요
그리고 그전에 볼린저밴드를 아래와 같이 만들어 주셨는데 어떤게 정확한
표현인지 알고 싶습니다.
Sum1 = 0;
CSum1 = 0;
For counter1 = 1 To Period1{
Sum1= Sum1 + ((HH[counter1]+LL[counter1]+CC[counter1])/3) * (Period1 - (counter1));
CSum1 = CSum1 + Period1 - (counter1);
}
WMA1 = Sum1/ CSum1;
SumSqrt1 = 0;
For Counter1 = 1 To Period1 {
SumSqrt1 = SumSqrt1 + (((HH[counter1]+LL[counter1]+CC[counter1])/3) - WMA1) * (((HH[counter1]+LL[counter1]+CC[counter1])/3) - WMA1);
}
Std1 = SquareRoot(SumSqrt1 / Period1);
input : p1(2),mLENGTH1(20),mLENGTH2(60), ## 월봉
mPeriod1(20),mPeriod2(60); ## 월봉
var : mTCHAN1(0),mTCHAN2(0),mcnt(0); ## 월봉
Var : mSum1(0), mCounter1(0), mCSum1(0),mWma1(0),mSumSqrt1(0),mStd1(0); ## 월봉
Var : mSum2(0), mCounter2(0), mCSum2(0),mWma2(0),mSumSqrt2(0),mStd2(0);
Array : mHH[70](0),mCC[70](0),mLL[70](0);
if sdate > sdate[1]+30 Then{
mHH[0] = H;
mLL[0] = L;
for mcnt = 1 to 61{
mHH[mcnt] = mHH[mcnt-1][1];
mCC[mcnt] = mCC[mcnt-1][1];
mLL[mcnt] = mLL[mcnt-1][1];
}
}
if H > mHH[0] Then mHH[0] = H;
if L < mLL[0] Then mLL[0] = L;
mCC[0] = C;
mTCHAN1 = mHH[1]; ## 월봉 price channel[1]
for mcnt = 1 to mLENGTH1 {
if mHH[mcnt] > mTCHAN1 Then
mTCHAN1 = mHH[mcnt];
}
mSum1 = 0;
mCSum1 = 0;
For mcounter1 = 0 To mPeriod1-1{
mSum1 = mSum1 + ((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) * (mPeriod1-mcounter1);
mCSum1 = mCSum1 + (mPeriod1-mcounter1);
}
mWMA1 = mSum1/mCSum1;
mSumSqrt1 = 0;
For mCounter1 = 0 To mPeriod1-1 {
mSumSqrt1 = mSumSqrt1 + (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1) * (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1);
}
mStd1 = SquareRoot(mSumSqrt1 / mPeriod1);
var1 = mwma1+(p1*mSTD1); ## 월봉 b.b 0봉전
var2 = 주봉중간값;
답변 1
예스스탁 예스스탁 답변
2011-09-28 16:10:21
안녕하세요
예스스탁입니다.
input : p1(2),mLENGTH1(20),mLENGTH2(60), ## 월봉
mPeriod1(20),mPeriod2(60); ## 월봉
var : mTCHAN1(0),mTCHAN2(0),mcnt(0); ## 월봉
Var : mSum1(0), mCounter1(0), mCSum1(0),mWma1(0),mSumSqrt1(0),mStd1(0); ## 월봉
Var : mSum2(0), mCounter2(0), mCSum2(0),mWma2(0),mSumSqrt2(0),mStd2(0);
var : cnt(0);
Array : mHH[70](0),mCC[70](0),mLL[70](0);
Array : HH[70](0),CC[70](0),LL[70](0);
if sdate > sdate[1]+30 Then{
mHH[0] = H;
mLL[0] = L;
for mcnt = 1 to 61{
mHH[mcnt] = mHH[mcnt-1][1];
mCC[mcnt] = mCC[mcnt-1][1];
mLL[mcnt] = mLL[mcnt-1][1];
}
}
if H > mHH[0] Then mHH[0] = H;
if L < mLL[0] Then mLL[0] = L;
mCC[0] = C;
mTCHAN1 = mHH[1]; ## 월봉 price channel[1]
for mcnt = 1 to mLENGTH1 {
if mHH[mcnt] > mTCHAN1 Then
mTCHAN1 = mHH[mcnt];
}
mSum1 = 0;
mCSum1 = 0;
For mcounter1 = 0 To mPeriod1-1{
mSum1 = mSum1 + ((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) * (mPeriod1-mcounter1);
mCSum1 = mCSum1 + (mPeriod1-mcounter1);
}
mWMA1 = mSum1/mCSum1;
mSumSqrt1 = 0;
For mCounter1 = 0 To mPeriod1-1 {
mSumSqrt1 = mSumSqrt1 + (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1) * (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1);
}
mStd1 = SquareRoot(mSumSqrt1 / mPeriod1);
if DayOfWeek(sdate) <= DayOfWeek(sdate[1]) and sdate > sdate[1] Then{
HH[0] = H;
LL[0] = L;
for cnt = 1 to 61{
HH[cnt] = HH[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
var1 = mwma1+(p1*mSTD1); ## 월봉 b.b 0봉전
var2 = (HH[0]+LL[0])/2;
의도하시는 볼린져밴드가 가중이평을 이용한 볼린져밴드이면
식이 맞습니다.
즐거운 하루되세요
> 맥스 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 아래의 내용은 일봉에서 월봉을 불러온 내용입니다.
아래수식에서 주봉의 중간값을 불러오고자 합니다.
var2 = 주봉중간값 을 추가해 주십시요
그리고 그전에 볼린저밴드를 아래와 같이 만들어 주셨는데 어떤게 정확한
표현인지 알고 싶습니다.
Sum1 = 0;
CSum1 = 0;
For counter1 = 1 To Period1{
Sum1= Sum1 + ((HH[counter1]+LL[counter1]+CC[counter1])/3) * (Period1 - (counter1));
CSum1 = CSum1 + Period1 - (counter1);
}
WMA1 = Sum1/ CSum1;
SumSqrt1 = 0;
For Counter1 = 1 To Period1 {
SumSqrt1 = SumSqrt1 + (((HH[counter1]+LL[counter1]+CC[counter1])/3) - WMA1) * (((HH[counter1]+LL[counter1]+CC[counter1])/3) - WMA1);
}
Std1 = SquareRoot(SumSqrt1 / Period1);
input : p1(2),mLENGTH1(20),mLENGTH2(60), ## 월봉
mPeriod1(20),mPeriod2(60); ## 월봉
var : mTCHAN1(0),mTCHAN2(0),mcnt(0); ## 월봉
Var : mSum1(0), mCounter1(0), mCSum1(0),mWma1(0),mSumSqrt1(0),mStd1(0); ## 월봉
Var : mSum2(0), mCounter2(0), mCSum2(0),mWma2(0),mSumSqrt2(0),mStd2(0);
Array : mHH[70](0),mCC[70](0),mLL[70](0);
if sdate > sdate[1]+30 Then{
mHH[0] = H;
mLL[0] = L;
for mcnt = 1 to 61{
mHH[mcnt] = mHH[mcnt-1][1];
mCC[mcnt] = mCC[mcnt-1][1];
mLL[mcnt] = mLL[mcnt-1][1];
}
}
if H > mHH[0] Then mHH[0] = H;
if L < mLL[0] Then mLL[0] = L;
mCC[0] = C;
mTCHAN1 = mHH[1]; ## 월봉 price channel[1]
for mcnt = 1 to mLENGTH1 {
if mHH[mcnt] > mTCHAN1 Then
mTCHAN1 = mHH[mcnt];
}
mSum1 = 0;
mCSum1 = 0;
For mcounter1 = 0 To mPeriod1-1{
mSum1 = mSum1 + ((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) * (mPeriod1-mcounter1);
mCSum1 = mCSum1 + (mPeriod1-mcounter1);
}
mWMA1 = mSum1/mCSum1;
mSumSqrt1 = 0;
For mCounter1 = 0 To mPeriod1-1 {
mSumSqrt1 = mSumSqrt1 + (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1) * (((mHH[mcounter1]+mLL[mcounter1]+mCC[mcounter1])/3) - mWMA1);
}
mStd1 = SquareRoot(mSumSqrt1 / mPeriod1);
var1 = mwma1+(p1*mSTD1); ## 월봉 b.b 0봉전
var2 = 주봉중간값;