커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8107
글번호 230811
답변완료
잘 부탁드립니다
1,주가범위 0일전 종가가 5000원 이상 60000 이하
2,주가이평비교[일]0봉전 종가 20이평 < 종가 10 이평 1회 이상
### 추가 해서 수정 부탁 드립니다 꾸벅
var1 = ma(C,20);
var2 = ma(C,60);
var3 = ma(c,120);
if m >= 1000000 and
C >= O*1.05 and C < O*1.30 and
var1 > var2 and var2 > var3 Then
find(1);
2018-03-22
194
글번호 117637
답변완료
지표부탁합니다.
매번도와 주심에 감사감사 드립니다.
두개의 지표를 일봉을 분봉주기로 전환 부탁드립니다.
그리고 종목검색식도 부탁드립니다.
aroon : CROSSUP(UpAroon, DnAroon)
가중이평 : Vwma1 > Vwma2 && VWMA2 > VWMA3 정배열
검색식 부탁드립니다.
감사합니다.
1. Aroon
input : Period(10);
var : Counter(0), Lowval(0), Highval(0), DownVel(0),UpVel(0), DnAroon(0),UpAroon(0) ;
Lowval= Lowest(Low, Period+1);
Highval = Highest(High, Period+1);
For counter= 0 To Period {
If Low[counter] == Lowval Then
DownVel = counter;
If High[counter] == highval Then
UpVel = counter;
}
DnAroon = 100*(Period-DownVel)/Period;
UpAroon = 100*(Period-UpVel)/Period;
Plot1(DnAroon, "Aroon Dn");
Plot2(UpAroon, "Aroon Up");
plotbaseline1(80,"강세 80");
plotbaseline2(50,"약세 50");
plotbaseline3(20,"약세 30");
inputs:Length1(5), Length2(20), Length3(60);
var: VolumeSum1(0), VolumeSum2(0), VolumeSum3(0), VWMA1(0), VWMA2(0), VWMA3(0);
VolumeSum1 = AccumN( v, Length1 ) ;
VWMA1 = AccumN( C * v , Length1 ) / VolumeSum1 ;
VolumeSum2 = AccumN( v, Length2 ) ;
VWMA2 = AccumN( C * v , Length2 ) / VolumeSum2 ;
VolumeSum3 = AccumN( v, Length3 ) ;
VWMA3 = AccumN( C * v , Length3 ) / VolumeSum3 ;
plot1(Vwma1);
plot2(Vwma2);
plot3(Vwma3);
2018-03-22
209
글번호 117636
정밀타격수 님에 의해서 삭제되었습니다.
2018-03-22
10
글번호 117635
답변완료
문의드립니다.
매번 감사합니다.
1. 기타
코딩 변환 부탁드립니다.
inputs:
Price( Close ), { price of which the standard deviation is
calculated }
Length( 90 ), { number of bars used in average true range (ATR)
and standard deviation (SD) calculations }
nK( 3 ), { number of ATRs to add to average to form Keltner
channel }
nBB( 2 ), { number of standard deviations used to calculate
Bollinger bands }
AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind)
level at which to issue alerts }
TargetPctOfRange( 100 ) ; { percentage of width of rectangle at
which to place profit target }
variables:
Rectangle( false ),
ATR( 0 ),
SDev( 0 ),
BBS_Ind( 0 ),
RectangleTop( 0 ),
RectangleBase( 0 ),
RectangleRange( 0 ) ;
if MarketPosition <> 0 then
Rectangle = false ;
{ Calculate Bollinger band squeeze indicator }
ATR = AvgTrueRange( Length ) ;
SDev = StandardDev( Price, Length, 1 ) ;
if nK <> 0 and ATR <> 0 then
begin
BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ;
if BBS_Ind crosses under AlertLine
and Rectangle = false
and MarketPosition = 0
then
begin
RectangleTop = Highest( Close, Length ) ;
RectangleBase = Lowest( Close, Length ) ;
RectangleRange = RectangleTop - RectangleBase ;
Rectangle = true ;
end ;
end ;
if Rectangle = true then
begin
if Close >= RectangleTop then
Buy this bar Close
else if Close <= RectangleBase then
Sell short this bar at Close ;
end ;
if MarketPosition = 1 then
begin
if Close >= RectangleTop + 0.01 * TargetPctOfRange *
RectangleRange then
Sell( “LX PT” ) this bar at Close ;
if Close <= RectangleTop - .5 * RectangleRange then
Sell( “LX SL” ) this bar at Close ;
end
else if MarketPosition = -1 then
begin
if Close <= RectangleBase - 0.01 *
TargetPctOfRange * RectangleRange then
BuyToCover( “SX PT” ) this bar at Close ;
if Close >= RectangleBase + .5 * RectangleRange then
Buy to cover( “SX SL” ) this bar at Close ;
end ;
Indicator: RectangleEvaluation
{Rectangle definition: See comments in code for strategy
“RectangleBreakout”. }
inputs:
Price( Close ), { price of which the standard deviation is calculated }
Length( 90 ), { number of bars used in average true range (ATR)
and standard deviation (SD) calculations }
nK( 3 ), { number of ATRs to add to average to form Keltner
channel }
nBB( 2 ), { number of standard deviations used to calculate
Bollinger bands }
AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind) level
at which to issue alerts }
TargetPctOfRange( 100 ) ; { percentage of width of rectangle
at which to place profit target }
variables:
ATR( 0 ),
SDev( 0 ),
BBS_Ind( 0 ),
Rectangle( false ),
LongPosition( false ),
ShortPosition( false ),
RectangleTop( 0 ),
RectangleBase( 0 ),
RectangleRange( 0 ),
LongTarget( 0 ),
LongPositionCount( 0 ),
ShortTarget( 0 ),
ShortPositionCount( 0 ),
LongTargetCount( 0 ),
ShortTargetCount( 0 ) ;
{ Calculate Bollinger band squeeze indicator }
ATR = AvgTrueRange( Length ) ;
SDev = StandardDev( Price, Length, 1 ) ;
if nK <> 0 and ATR <> 0 then
begin
BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ;
if BBS_Ind crosses under AlertLine
and Rectangle = false
and LongPosition = false
and ShortPosition = false
then
begin
RectangleTop = Highest( Close, Length ) ;
RectangleBase = Lowest( Close, Length ) ;
RectangleRange = RectangleTop - RectangleBase ;
Rectangle = true ;
Plot1( Close, “Alert” ) ;
end ;
end ;
if RectangleTop <> 0 and Rectangle = true then
begin
Plot2( RectangleTop, “Top” ) ;
Plot3( RectangleBase, “Base” ) ;
end ;
if Rectangle = true then
begin
if Close crosses over RectangleTop then
begin
LongTarget = RectangleTop + 0.01 *
TargetPctOfRange * RectangleRange ;
Rectangle = false ;
LongPosition = true ;
LongPositionCount = LongPositionCount + 1 ;
end ;
if Close crosses under RectangleBase then
begin
ShortTarget = RectangleBase - 0.01 *
TargetPctOfRange * RectangleRange ;
Rectangle = false ;
ShortPosition = true ;
ShortPositionCount = ShortPositionCount + 1 ;
end ;
end ;
if LongPosition = true then
begin
if Close > LongTarget then
begin
LongTargetCount = LongTargetCount + 1 ;
LongPosition = false ;
end
else if Close < RectangleTop - .5 * RectangleRange
then
LongPosition = false ;
Plot4( LongTarget, “Tgt” ) ;
end
else if ShortPosition = true then
begin
if Close < ShortTarget then
begin
ShortTargetCount = ShortTargetCount + 1 ;
ShortPosition = false ;
end
else if Close > RectangleBase + .5 * RectangleRange
then
ShortPosition = false ;
Plot4( ShortTarget, “Tgt” ) ;
end ;
Indicator: Rectangle-RS
{Rectangle definition: See comments in code for strategy
“RectangleBreakout”. }
inputs:
Price( Close ), { price of which the standard deviation is
calculated }
Length( 90 ), { number of bars used in average true range (ATR)
and standard deviation (SD) calculations }
nK( 3 ), { number of ATRs to add to average to form Keltner
channel }
nBB( 2 ), { number of standard deviations used to calculate
Bollinger bands }
AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind) level
at which to issue alerts }
TargetPctOfRange( 100 ) ; { percentage of width of rectangle
at which to place profit target }
variables:
ATR( 0 ),
SDev( 0 ),
BBS_Ind( 0 ),
Rectangle( false ),
LongPosition( false ),
ShortPosition( false ),
RectangleTop( 0 ),
RectangleBase( 0 ),
RectangleRange( 0 ),
LongTarget( 0 ),
LongPositionCount( 0 ),
ShortTarget( 0 ),
ShortPositionCount( 0 ),
LongTargetCount( 0 ),
ShortTargetCount( 0 ),
LongTgtHitRatio( 0 ),
ShortTgtHitRatio( 0 ) ;
{ Calculate Bollinger band squeeze indicator }
ATR = AvgTrueRange( Length ) ;
SDev = StandardDev( Price, Length, 1 ) ;
if nK <> 0 and ATR <> 0 then
begin
BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ;
if BBS_Ind crosses under AlertLine
and Rectangle = false
and LongPosition = false
and ShortPosition = false
then
begin
RectangleTop = Highest( Close, Length ) ;
RectangleBase = Lowest( Close, Length ) ;
RectangleRange = RectangleTop - RectangleBase ;
Rectangle = true ;
end ;
end ;
if RectangleTop <> 0 and Rectangle = true then
begin
Plot2( RectangleTop, “Top” ) ;
Plot3( RectangleBase, “Base” ) ;
end ;
if Rectangle = true then
begin
if Close crosses over RectangleTop then
begin
LongTarget = RectangleTop + 0.01 *
TargetPctOfRange * RectangleRange ;
Rectangle = false ;
LongPosition = true ;
LongPositionCount = LongPositionCount + 1 ;
end ;
if Close crosses under RectangleBase then
begin
ShortTarget = RectangleBase - 0.01 *
TargetPctOfRange * RectangleRange ;
Rectangle = false ;
ShortPosition = true ;
ShortPositionCount = ShortPositionCount + 1 ;
end ;
end ;
if LongPosition = true then
begin
if Close > LongTarget then
begin
LongTargetCount = LongTargetCount + 1 ;
LongPosition = false ;
end
else if Close < RectangleTop - .5 * RectangleRange
then
LongPosition = false ;
end
else if ShortPosition = true then
begin
if Close < ShortTarget then
begin
ShortTargetCount = ShortTargetCount + 1 ;
ShortPosition = false ;
end
else if Close > RectangleBase + .5 * RectangleRange
then
ShortPosition = false ;
end ;
if LongPositionCount > 0 then
begin
LongTgtHitRatio = LongTargetCount /
LongPositionCount ;
Plot5( LongTgtHitRatio, “LongTgtRatio” ) ;
end ;
if ShortPositionCount > 0 then
begin
ShortTgtHitRatio = ShortTargetCount /
ShortPositionCount ;
Plot6( ShortTgtHitRatio, “ShrtTgtRatio” ) ;
end ;
2018-03-22
369
글번호 117634
답변완료
수식 부탁드립니다.
질문 01)
현재가가 전일 고점 돌파중인 종목 검색식
질문 02)
현재가가 전일 위에 있는 종목 검색식
2018-03-22
188
글번호 117626
답변완료
당일 것 print 어떻게 하나요?
print해서 csv파일 저장했는데
확인 해 보니 당일 이전 것 모두 출력되서 데이터 저장하는게 좀 번거러운데요
오늘것만 출력할 수 없을까요
2018-03-22
228
글번호 117622
답변완료
문의드립니다.
현재쓰고 있는 지표식입니다.
첨부파일 처럼 흰색박스를 그리고 싶습니다.
input : N(3);
if C > O Then
var1 = 1;
if C < O Then
var1 = -1;
value1 = CountIF(var1 == 1,N);
Value2 = CountIF(var1 == -1,N);
if var1 == -1 and value1[1] == N Then
Value3 = L[3];
if var1 == 1 and value2[1] == N Then
value4 = H[3];
plot1(value3);
plot2(value4);
2018-03-22
274
글번호 117613
답변완료
문의드려요
분할진입 분할청산하는 로직에서 맨마지막에 일어난 가격을 알고싶습니다.
LatestEntryPrice와 LatestExitprice 중에서도 가장 최근에 이루어진 가격을 구해주세요.
2018-03-22
165
글번호 117612
답변완료
일봉 스토캐스틱 20.1 선이 20이상인 종목 검색식 부탁합니다.
기본적으로 있는건 추세나 골든크로스, 특정 값만 검색되는듯 합니다.
일봉 기준 스토캐스틱 20.1 선이 20이상인 종목 검색식 부탁드립니다.
2018-03-22
195
글번호 117611