커뮤니티
문의드립니다.
2018-04-04 08:53:16
145
글번호 117929
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환부탁드립니다.
inputs:
Price( Close ),
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
RSIValue( 0 ),
SMAValue( 0 ),
PID( 0 ) ;
RSIValue = RSI( Price, RSILength ) ;
SMAValue = Average( Price, AverageLength ) ;
if Price > SMAValue then
PID = ( RSIValue - UpTrendEntry ) /
( UpTrendExit - UpTrendEntry ) * 100
else
PID = ( RSIValue - DownTrendEntry ) /
( DownTrendExit - DownTrendEntry ) * 100 ;
Plot1( PID, “PID” ) ;
inputs:
Price( Close ),
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
RSIValue( 0 ),
SMAValue( 0 ) ;
RSIValue = RSI( Price, RSILength ) ;
SMAValue = Average( Price, AverageLength ) ;
if Close > SMAValue then
begin
if RSIValue crosses over UpTrendEntry then
Buy ( “UpTrendBuy” ) next bar market
else if RSIValue crosses under UpTrendExit then
Sell ( “UpTrendSell” ) next bar at market ;
end
else
begin
if RSIValue crosses over DownTrendEntry then
Buy ( “DownTrendBuy” ) next bar market
else if RSIValue crosses under DownTrendExit then
Sell ( “DownTrendSell” ) next bar at market ;
end ;
답변 1
예스스탁 예스스탁 답변
2018-04-04 10:42:40
안녕하세요
예스스탁입니다.
1.
inputs:
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
Price( 0 ),
RSIValue( 0 ),
SMAValue( 0 ),
PID( 0 ) ;
Price = C;
RSIValue = RSI(RSILength ) ;
SMAValue = ma(Price, AverageLength ) ;
if Price > SMAValue then
PID = ( RSIValue - UpTrendEntry ) /( UpTrendExit - UpTrendEntry ) * 100;
else
PID = ( RSIValue - DownTrendEntry ) / ( DownTrendExit - DownTrendEntry ) * 100 ;
Plot1( PID, "PID" ) ;
2
inputs:
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
Price(0),
RSIValue( 0 ),
SMAValue( 0 ) ;
Price = C;
RSIValue = RSI(RSILength ) ;
SMAValue = ma( Price, AverageLength ) ;
if Close > SMAValue then
begin
if crossup(RSIValue,UpTrendEntry) then
Buy ("UpTrendBuy",AtMarket);
else if CrossDown(RSIValue,UpTrendExit) then
Sell ("UpTrendSell",AtMarket);
end
else
begin
if crossup(RSIValue, DownTrendEntry) then
Buy("DownTrendBuy",AtMarket);
else if CrossDown(RSIValue,DownTrendExit) then
Sell ("DownTrendSell",AtMarket);
end ;
즐거운 하루되세요
> 잡다백수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다.
1. 기타
코딩 변환부탁드립니다.
inputs:
Price( Close ),
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
RSIValue( 0 ),
SMAValue( 0 ),
PID( 0 ) ;
RSIValue = RSI( Price, RSILength ) ;
SMAValue = Average( Price, AverageLength ) ;
if Price > SMAValue then
PID = ( RSIValue - UpTrendEntry ) /
( UpTrendExit - UpTrendEntry ) * 100
else
PID = ( RSIValue - DownTrendEntry ) /
( DownTrendExit - DownTrendEntry ) * 100 ;
Plot1( PID, “PID” ) ;
inputs:
Price( Close ),
RSILength( 14 ),
AverageLength( 200 ),
UpTrendEntry( 35 ),
UpTrendExit( 85 ),
DownTrendEntry( 20 ),
DownTrendExit( 70 ) ;
variables:
RSIValue( 0 ),
SMAValue( 0 ) ;
RSIValue = RSI( Price, RSILength ) ;
SMAValue = Average( Price, AverageLength ) ;
if Close > SMAValue then
begin
if RSIValue crosses over UpTrendEntry then
Buy ( “UpTrendBuy” ) next bar market
else if RSIValue crosses under UpTrendExit then
Sell ( “UpTrendSell” ) next bar at market ;
end
else
begin
if RSIValue crosses over DownTrendEntry then
Buy ( “DownTrendBuy” ) next bar market
else if RSIValue crosses under DownTrendExit then
Sell ( “DownTrendSell” ) next bar at market ;
end ;
이전글