커뮤니티
문의드립니다.
2018-02-23 08:08:05
185
글번호 116850
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환 부탁드립니다.
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand, “UpperBand” ) ;
Plot2( LowerBand, “LowerBand” ) ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp, “UpperBndDamp” ) ;
Plot4( LowerBandDamp, “LowerBndDamp” ) ;
end ;
end ;
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; { set to 0 for undamped
calculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 )
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening )
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
답변 3
예스스탁 예스스탁 답변
2018-02-23 11:48:41
안녕하세요
예스스탁입니다.
1.지표
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand,"UpperBand") ;
Plot2( LowerBand,"LowerBand") ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp,"UpperBndDamp") ;
Plot4( LowerBandDamp,"LowerBndDamp") ;
end ;
end ;
2 사용자함수
함수명 : RSI_Band
반환값형 : 숫자형
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; #{ set to 0 for undampedcalculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 );
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening );
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환 부탁드립니다.
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand, “UpperBand” ) ;
Plot2( LowerBand, “LowerBand” ) ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp, “UpperBndDamp” ) ;
Plot4( LowerBandDamp, “LowerBndDamp” ) ;
end ;
end ;
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; { set to 0 for undamped
calculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 )
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening )
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
잡다백수
2018-02-23 12:30:58
코딩감사합니다.
여기서 UpperBandDamp 이거는 지표상 원래 나오기 힘든 지표인가요? 실행해보니 true를 해놓고 실행해봐도 선이 안나와서 질문드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의드립니다.
> 안녕하세요
예스스탁입니다.
1.지표
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand,"UpperBand") ;
Plot2( LowerBand,"LowerBand") ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp,"UpperBndDamp") ;
Plot4( LowerBandDamp,"LowerBndDamp") ;
end ;
end ;
2 사용자함수
함수명 : RSI_Band
반환값형 : 숫자형
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; #{ set to 0 for undampedcalculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 );
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening );
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환 부탁드립니다.
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand, “UpperBand” ) ;
Plot2( LowerBand, “LowerBand” ) ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp, “UpperBndDamp” ) ;
Plot4( LowerBandDamp, “LowerBndDamp” ) ;
end ;
end ;
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; { set to 0 for undamped
calculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 )
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening )
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
예스스탁 예스스탁 답변
2018-02-23 12:37:05
안녕하세요
예스스탁입니다.
값이 출력되지 않는 것이 아니라 Dampening값이 크면
UpperBand와 UpperBandDamp가,
LowerBand와 LowerBandDamp가 값이 같게 됩니다.
Dampening 값을 작게 지정해 보시기 바랍니다.
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : Re : Re : 문의드립니다.
> 코딩감사합니다.
여기서 UpperBandDamp 이거는 지표상 원래 나오기 힘든 지표인가요? 실행해보니 true를 해놓고 실행해봐도 선이 안나와서 질문드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의드립니다.
> 안녕하세요
예스스탁입니다.
1.지표
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand,"UpperBand") ;
Plot2( LowerBand,"LowerBand") ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp,"UpperBndDamp") ;
Plot4( LowerBandDamp,"LowerBndDamp") ;
end ;
end ;
2 사용자함수
함수명 : RSI_Band
반환값형 : 숫자형
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; #{ set to 0 for undampedcalculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 );
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening );
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환 부탁드립니다.
inputs:
RSILength( 14 ),
OverSold( 30 ),
OverBought( 70 ),
PlotDampedLines( true ),
Dampening( 0.1 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 ),
UpperBandDamp( 0 ),
LowerBandDamp( 0 ) ;
UpperBand = RSI_Band( RSILength, OverBought, 0 ) ;
LowerBand = RSI_Band( RSILength, OverSold, 0 ) ;
UpperBandDamp = RSI_Band( RSILength, OverBought,
Dampening ) ;
LowerBandDamp = RSI_Band( RSILength, OverSold,
Dampening ) ;
if CurrentBar >= RSILength then
begin
Plot1( UpperBand, “UpperBand” ) ;
Plot2( LowerBand, “LowerBand” ) ;
if PlotDampedLines then
begin
Plot3( UpperBandDamp, “UpperBndDamp” ) ;
Plot4( LowerBandDamp, “LowerBndDamp” ) ;
end ;
end ;
inputs:
Period( numericsimple ),
TargetRSILevel( numericsimple ),
Dampening( numericsimple ) ; { set to 0 for undamped
calculation }
variables:
CloseToMatchRSI( 0 ),
W( 0 ),
S( 0 ),
P( 0 ),
N( 0 ),
Result( 0 ),
Diff( 0 ) ;
Diff = Close - Close[1] ;
if Diff > 0 then
begin
W = Diff ;
S = 0 ;
end
else if Diff < 0 then
begin
S = -Diff ;
W = 0 ;
end ;
if RSI_Band[1] > Close[1] then
CloseToMatchRSI = Close[1] + P - P * Period -
( ( N * Period ) - N ) * TargetRSILevel /
( TargetRSILevel - 100 )
else
CloseToMatchRSI = Close[1] - N - P + N * Period +
P * Period + ( 100 * P ) / TargetRSILevel - ( 100 *
P * Period ) / TargetRSILevel ;
if Dampening <> 0 then
if CloseToMatchRSI - Close > Dampening * Close then
CloseToMatchRSI = Close * ( 1 + Dampening )
else if CloseToMatchRSI - Close < -Dampening * Close
then
CloseToMatchRSI = Close * ( 1 - Dampening ) ;
P = ( ( Period - 1 ) * P + W ) / Period ;
N = ( ( Period - 1 ) * N + S ) / Period ;
if CurrentBar >= Period then
RSI_Band = CloseToMatchRSI ;