커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1643
글번호 230811
답변완료
문의
30분이평선 20,60,120,200이평을 5분봉에 나타날수 있도록 부탁드립니다
2022-10-03
942
글번호 162683
답변완료
시스템
안녕하세요
아래식 해석 부탁드립니다
value = RSI(Period);
value = Disparity(Period) ;
If CrossUP(value, LPercent) Then
value = 1;
If CrossUp(value,LPercent) Then
value = value + 1;
if value >= 2 then buy();
수고하세요
2022-10-03
882
글번호 162682
bestway 님에 의해서 삭제되었습니다.
2022-10-03
46
글번호 162681
답변완료
수식문의 드립니다.
항상 감사드립니다.
Q1 : 예를들어, 60틱차트에서 거래를 하는데요,
10분봉등등 다른 세팅 차트에서 60틱에서 매수 매도된 표시를 보이게 하고싶습니다.
Q2 : buy 또는 sell 둘다 포함 해서 하루에 5번만 거래하고 끝내는 수식이 궁금합니다.
2022-10-03
978
글번호 162680
답변완료
강세 약세 거래량지표 전환부탁드리빈다
변환 부탁드립니다
수식1 강세
base=(H+L) / 2;
lower_band=base-atr(period)*multiple;
uptrend=valuewhen(1, highest(lower_band(1), period)<lower_band,
lower_band);
upper_band=base+atr(period)*multiple;
downtrend=valuewhen(1, lowest(upper_band(1), period)>upper_band,
upper_band);
if(eavg(C, MA_period)<C and C>uptrend, 1, 0)
수식2 약세
base=(H+L) / 2;
lower_band=base-atr(period)*multiple;
uptrend=valuewhen(1, highest(lower_band(1), period)<lower_band,
lower_band);
upper_band=base+atr(period)*multiple;
downtrend=valuewhen(1, lowest(upper_band(1), period)>upper_band,
upper_band);
if(eavg(C, MA_period)>C and C<downtrend, 1, 0)
지표조건설정
period 10
multiple 3
MA_period 125
######거래량 지표변환부탁드려요
수식1 거래량비율
VV=sum(if(C>C(1),V,0),Period)/
sum(if(C<C(1),V,0),Period)
수식2 음봉기울기
if(VV<VV(1), VV, 0)
수식3 양봉기울기
if(VV>VV(1), VV, 0)
수식4 20
eavg(VV, 20)
수식5 60
eavg(VV, 60)
=============================
지표조건설정
Period 125
2022-10-03
1017
글번호 162679
답변완료
안녕하세요 믄의드립니다
먼저 감사드립니다
RSI 변수를 달리하는 3개의지표를 한지표에 묶어서 사용하고 싶습니다
RSI1 ,RSI2, RSI3를 변수 조정 가능하게 부탁드립니다..
2022-10-03
1031
글번호 162678
답변완료
문의 드립니다.
input : 익절틱수(160),손절틱수(30);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("ss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*10);
Sell("s8",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*10);
Sell("s9",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bbb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bbb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
----------
일봉매매를 모의테스트 중입니다.
장시작후 1계약 주문인데 체결내역은 2,3계약으로 주문후 체결이 되어 있습니다.
수식어에 문제가 있는건가요 ?
2022-10-03
925
글번호 162677
답변완료
문의드립니다.
늘 수고해주셔서 감사드립니다.
지수 변동이 생길 때 첫 진입 방법은 그대로 하고, 다음 추가 진입 방법을 변경해주시면 고맙겠습니다.
2, 3, 4, 5, 6, 7...번째까지 추가 진입시 첫 진입 이후 추가되는 +, - 진입 틱 수를 각각 지정할 수 있게 해주시고,
2, 3, 4, 5, 6, 7...번째까지 추가 진입 수량도 각각 지정할 수 있게 해주세요.
Input:length(12);
Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),TL2(0),TL3(0),Text1(0),처리구분(""),TL_Val1(0),TL_Val2(0),color(0);
var:T(0),B(0),Bx(0),S(0),Sx(0);
Array:고점[10,2](0),저점[10,2](0);
처리구분 = "";
If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then
{
If 저점[1,1] > L Then 처리구분 = "저점처리";
If 고점[1,1] < H Then 처리구분 = "고점처리";
}
Else If Highest(H,length) == H and lastHiVal <> H Then 처리구분 = "고점처리";
Else If Lowest(L,length) == L and lastLoVal <> L Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
T = 1;
lastHiVal = H;
If 고점[1,2] < 저점[1,2] Then
{
For j = 10 DownTo 2
{
고점[j,1] = 고점[j-1,1];
고점[j,2] = 고점[j-1,2];
}
}
If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then
{
고점[1,1] = H;
고점[1,2] = Index;
sBar = Index - 저점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
If 고점[3,1][1] < 고점[2,1][1] and 고점[2,1][1] > 고점[1,1][1] and 저점[2,1][1] < 저점[1,1][1] Then
TL_Delete(TL2);
}
if 고점[1,1] > 고점[2,1] or 고점[2,1] == 0 Then{
color = RED;
# buy("b");
}
TL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(고점[1,1],2));
Text_SetStyle(Text1, 2, 1);
If 고점[3,1] < 고점[2,1] and 고점[2,1] > 고점[1,1] and 저점[2,1] < 저점[1,1] Then
{
sBar = Index - 저점[2,2];
eBar = Index - 저점[1,2];
}
}
}
If 처리구분 == "저점처리" Then
{
T = -1;
lastLoVal = L;
If 저점[1,2] < 고점[1,2] Then
{
For j = 10 DownTo 2
{
저점[j,1] = 저점[j-1,1];
저점[j,2] = 저점[j-1,2];
}
}
If 저점[1,2] < 고점[1,2] or 저점[1,1] > L Then
{
저점[1,1] = L;
저점[1,2] = Index;
sBar = Index - 고점[1,2];
eBar = 0;
If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then
{
TL_Delete(TL1);
Text_Delete(Text1);
If 저점[2,1][1] < 저점[1,1][1] and 저점[2,1][1] < 저점[3,1][1] and 고점[2,1][1] > 고점[1,1][1] Then
TL_Delete(TL3);
}
if 저점[1,1] < 저점[2,1] or 저점[2,1] == 0 Then{
color = blue;
# sell("s");
}
TL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]);
TL_SetColor(TL1,color);
Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(abs(고점[1,1]-저점[1,1])/PriceScale,0)+NewLine+NumToStr(저점[1,1],2));
Text_SetStyle(Text1, 2, 0);
If 저점[2,1] < 저점[1,1] and 저점[2,1] < 저점[3,1] and 고점[2,1] > 고점[1,1] Then
{
sBar = Index - 고점[2,2];
eBar = Index - 고점[1,2];
}
}
}
TL_SetSize(TL1,3);
input : N(),첫진입틱수(),추가진입틱수();
#상승구간의 마지막저점 저장
if Color == RED Then
{
var1 = 저점[2,1];
}
#하락구간의 마지막 고점 저장
if Color == BLUE Then
{
var2 = 고점[2,1];
}
if MarketPosition <= 0 Then
{
if color == BLUE and var1 > 0 and L > var1-PriceScale*첫진입틱수 Then
Buy("b",AtLimit,var1-PriceScale*첫진입틱수,1);
}
if MarketPosition == 1 Then
{
value1 = Floor(MaxEntries/N)+1;
Buy("bb",AtLimit,(var1[BarsSinceEntry]-PriceScale*첫진입틱수)-(PriceScale*추가진입틱수)*MaxEntries,value1);
if T == -1 and 고점[1,1] > 0 Then
ExitLong("bx1",AtLimit,고점[1,1]+PriceScale*1);
if T == 1 and 고점[2,1] > 0 Then
ExitLong("bx2",AtLimit,고점[2,1]+PriceScale*1);
}
if MarketPosition >= 0 Then
{
if Color == RED and Var2 > 0 and H < var2+PriceScale*첫진입틱수 Then
Sell("s",AtLimit,Var2+PriceScale*첫진입틱수,1);
}
if MarketPosition == -1 Then
{
value1 = Floor(MaxEntries/N)+1;
Sell("ss",AtLimit,(var2[BarsSinceEntry]+PriceScale*첫진입틱수)+(PriceScale*추가진입틱수)*MaxEntries,value1);
if T == 1 and 저점[1,1] > 0 Then
ExitShort("sx1",AtLimit,저점[1,1]-PriceScale*1);
if T == -1 and 저점[2,1] > 0 Then
ExitShort("sx2",AtLimit,저점[2,1]-PriceScale*1);
}
2022-10-04
854
글번호 162676
답변완료
부탁드립니다
수고하십니다
그림파일은하늘색점파랑봉은 참조데이터atm 연결풋옵션(data2),빨강봉은콜기본차트(data1)입니다
(data2)와(data1)의중심선과 data2가교차승해서 data2풋고가와 위형제콜옵션저가와맞나는 중심선 ,안만날때는그사이가0.15사이의 중심선 반대로 교차실패때는 data2풋저가와 아래형제콜옵션 고가와 맞나는중심선,안만날때는그사이가0.15사이의 중심선 수식 부탁드립니다
★검정색선은 data2풋이 위,아래 형재옵션 콜 과 만나는 중심선 표시입니다★
수식 부탁드립니다 안되면 비슷한 수식으로도 꼭 부탁드립니다 감사합니다~~~~
2022-10-03
923
글번호 162675