커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
5451
글번호 230811
답변완료
동시호가 개시 시점에 일봉이 음봉인 경우 시장가 매도 주문토록 수식 추가 문의
input : Price(12500),진입횟수(1);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if NextBarSdate == sDate and
CurrentDate == sDate and
NextBarStime >= 91500 and
H < price and
entry < 진입횟수 Then
Buy("b",AtStop,price);
→ 위 수식에,
동시호가 개시 시점(15:20 이후)에 해당 종목의 일봉이 음봉인 경우 시장가 매도 주문하여 당일 전량 청산될 수 있도록 수식 추가 부탁드립니다. 감사합니다.
2024-03-10
954
글번호 177336
답변완료
문의드립니다~
매도1 한계약과 매도2 한계약을 피라미딩 다른진입신호만 허용으로 틱차트상으로 적용했습니다.
2계약이 잡혔을때
여기서 1계약은 avgEntryPrice를 이용해서 40포인트에서 청산하고
나머지 1계약은 120포인트에서 청산하도록'
그리고 1계약만 잡혔을땐 40포인트에서 청산하도록 식 부탁드립니다.
2024-03-10
889
글번호 177335
답변완료
부탁드립니다
안녕하세요
항상 성심껏 만들어 주셔서 감사드립니다.
아래 기준의 2가지 옵션 피보나치 지표 부탁드립니다.
공통적으로...
- 선,칼라 선택 가능
- 0.0%, 23.6%, 38.2%, 50.0%, 61.8%, 76.4%, 100% 기본수열 표시
- 가능하다면 변화된 과거선 없이 최종 발생한 수평선만 표시
옵션 1번
- (변수-n봉전)기준 당일 최고점(0.0%)에서 (변수-n봉전)기준 당일 최저점(38.2%)를 표시하고 나머지 수열(23.6%, 50.0%, 61.8%, 76.4%, 100%)을 하향으로 표시
옵션 2번
- (변수-n봉전)기준 당일 최저점(0.0%)에서 (변수-n봉전)기준 당일 최고점(38.2%)를 표시하고 나머지 수열(23.6%, 50.0%, 61.8%, 76.4%, 100%)을 상향으로 표시
설명이 부족하지 않았는지 모르겠네요...오늘도 부탁드리고 미리 감사드립니다.
좋은 하루되시길 바랍니다.
2024-03-10
868
글번호 177334
답변완료
수식 요 청
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0),T(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
If STime == 180000 Then
DBN = 0;
DBN = DBN + 1;
Var1 = Period;
Var2 = Var1 - 1;
Var3 = Var1 - 2;
Var5 = Sence;
Var6 = H-L;
JustChanged = FALSE;
if CurrentBar <= Var2 then begin
Highs[CurrentBar] = Close;
Lows[CurrentBar] = Close;
RRange[CurrentBar] = (H-L) /2;
end;
if CurrentBar == Var1 then begin
if Highs[Var2] >= Highs[Var3] then begin
UpWave[1] = TRUE;
HHighest = Highs[Var2];
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
#Plot1(VLineUp,"VLineUp");
end;
if Highs[Var2] < Highs[Var3] then begin
DnWave[1] = TRUE;
LLowest = Lows[Var2];
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
#Plot2(VLineDn,"VLineDn");
end;
end;
if CurrentBar > Var1 then begin
if DnWave[1] and Close > VLineDn then begin
DnWave[1] = FALSE;
UpWave[1] = TRUE;
JustChanged = TRUE;
HHighest = Close;
LLowest = 0;
end;
if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin
UpWave[1] = FALSE;
DnWave[1] = TRUE;
JustChanged = TRUE;
LLowest = Close;
HHighest = 0;
end;
if JustChanged == FALSE then begin
if Close > HHighest then
HHighest = Close;
else if Close < LLowest then
LLowest = Close;
end;
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
if UpWave[1] then
T = 1;
else if DnWave[1] then
T = -1;
end;
Input : BBP(120), MultiD(2);
var : BBmd(0),BBup(0),BBdn(0);
BBmd = ma(C,Period);
BBup = BollBandUp(BBP,MultiD);
BBdn = BollBandDown(BBP,MultiD);
if CrossDown(C,BBup) and t == -1 Then
sell();
if crossup(C,BBdn) and t == 1 Then
buy();
안녕하세요
위식에서 수정부탁드림니다
매수조건
HP선이 이평60 선위에있는 상태에서
Hp선을 터치나 하락후 상승돌파시
sw2선이 양선일때 매수
손절청산 이평60.hp선하향돌파시.
매도
HP선이 이평60 선아래에있고
sw2선이 음선일때 매도
손절청산 이평60.hp선 상향돌파시
2024-03-11
938
글번호 177333
답변완료
수식 부탁 합니다.
안녕하세요.키움수식을 변환 부탁 드립니다.
**지표식
조건 = npreV(1)*(거래량비율/100) < V;
HH = valuewhen(1,조건,H);
LL = valuewhen(1,조건,L);
HH
**매수식
V()*1.5 < V and crossup(c,dayopen())
항상 수고많으십니다.건강하세요.
2024-03-10
1007
글번호 177332
답변완료
전략 작성 부탁드려요~
키움 기준으로 간단히 쓸께요
1.아래 내용을 예스트레이더 시스템 전략으로 부탁드려요
v1 = ValueWhen(1, crossup (trix,trixsignal), trixsignal);
v2 = ValueWhen(2, crossup (trix,trixsignal), trixsignal);
v3 = OBV(_PRICE_);
v4 = MA(OBV, SignalPeriod, _MaType_);
if ( v1> v2) and ( v4 > v4[1] ) 일 경우 매수
2. valuewhen을 사용자 함수로 저장하여 사용하고 싶은데 함수 수식 알려주세요.
3. 스톡케스틱 지표가 단순이평일때 지수이평 일때를 어떻게 전환하나요?
간단히 설정으로 못하나요?
2024-03-10
954
글번호 177331
답변완료
도움요청합니다
1번
a=(nPredayclose(2)+nPredayclose(1)+dayclose())/3;
crossup(c,a)
2번
a=predayhigh();
o < a and h > a
and
avg(v,1)>100000
전일고가관통 1분거래량10만주이상
1번 2번 각각
화살표 신호
분봉에서 사용할수있게 도와주셔요
2024-03-09
858
글번호 177330
답변완료
도움요청합니다
1번
a=(nPredayclose(2)+nPredayclose(1)+dayclose())/3;
crossup(c,a)
2번
a=predayhigh();
o < a and h > a
and
avg(v,1)>100000
전일고가관통 1분거래량10만주이상
1번 2번 각각
분봉에서 사용할수있게 도와주셔요
랭귀지에 사용할려고합니다
2024-03-09
997
글번호 177329
답변완료
시스템식 요청드립니다.
안녕하세요 수식을 작성하는데 어려움이 있어 이렇게 글을 남깁니다.
위의 그림 2, 3번을 보시면 대략적으로 그림으로 작성하였습니다.
타점 에서 100주 매수후 30주 매도 하고 중간에 30주 매도 해서 총 40주가 남은
상태에서 타점 1로 60주 매수해서 다시 100주가 되도록 맞췄습니다.
그런데 타점1 5% 익절에서 30주만 매도가 되어야 하는데
그림 1 성능보고서를 보시면, 타점에서 30주매도, 타점 1에서 30주 매도 총 60주가
매도 되었습니다.
타점, 타점 1이 따로따로 시스템식이 적용 되는것 같은데
어떻게 해야 할지 부탁드리겠습니다.
input : 베팅금(1000000);
input : 시작날짜 (20240113),Xtime(110000) ;
input : 타점(5000),손절(1000);
var : P618(0),P5(0),P382(0),HH(0),LL(0);
Var : day(0),EntryDay(0),entry(False),dd(0),ED(0);
if sDate >= 시작날짜 Then
{
if Bdate != Bdate[1] Then
{
entry = true;
day = day+1;
dd = dd+1;
}
if HH == 0 or (HH > 0 and H > HH) Then
HH = H;
#고점갱신용 수식
if LL == 0 or (LL > 0 and L < LL) Then
LL = L;
#저점갱신용 수식
}
P618 = LL+(HH-LL)*0.618;
P5 = LL+(HH-LL)*0.5;
P382 = LL+(HH-LL)*0.382;
if MarketPosition == 0 and entry == true and c > 타점 Then
Buy("타점",AtLimit,타점,Floor((베팅금)/타점));
if MarketPosition == 1 Then
{
Condition1 = False;
If C >= HH[1] AND LatestExitName(0) == "타점 5%익절 P5청산" Then
{
Condition1 = true;
Buy("타점1",OnClosE,DeF,Floor((베팅금)/타점*0.6));
}
If C >= HH[1] AND LatestExitName(0) == "타점 10%익절 P618청산" Then
{
Condition1 = true;
Buy("타점2",OnClosE,DeF,Floor((베팅금)/타점*0.8));
}
#전봉대비 수량 감소(일부 청산발생을 위미)
if CurrentContracts < CurrentContracts[1] Then
{
#청산가 저장
var1 = LatestExitPrice(0);
if LatestExitName(0) == "타점 5%익절" or LatestExitName(0) == "타점1 5%익절" or LatestExitName(0) == "타점2 5%익절" Then
Condition11 = true;
if LatestExitName(0) == "타점 5%익절 P5청산" or LatestExitName(0) == "타점 10%익절" or LatestExitName(0) == "타점1 5%익절 P618청산"
or LatestExitName(0) == "타점1 10%익절" or LatestExitName(0) == "타점2 5%익절 P618청산" or LatestExitName(0) == "타점2 10%익절" Then
Condition22 = true;
if LatestExitName(0) == "타점 5%익절 P382청산" or LatestExitName(0) == "타점 10%익절 P618청산" or LatestExitName(0) == "타점1 5%익절 P5청산"
or LatestExitName(0) == "타점1 10%익절 P618청산" or LatestExitName(0) == "타점2 5%익절 P5청산" or LatestExitName(0) == "타점2 10%익절 P618청산" Then
Condition33 = true;
if LatestExitName(0) == "타점 10%익절 P5청산" or LatestExitName(0) == "타점1 10%익절 P5청산" or LatestExitName(0) == "타점2 10%익절 P5청산" Then
Condition44 = true;
}
#전봉대비 수량 증가(추가 진입발생을 의미)
if CurrentContracts > CurrentContracts[1] Then
{
#현재수량 저장
Var3 = CurrentContracts;
Var4 = AvgEntryPrice;
Condition11 = False;
Condition22 = False;
Condition33= False;
Condition44 = False;
}
if (LatestEntryName(0) == "타점") and Condition1 == False Then
ExitLong("타점 5%익절",AtLimit,AvgEntryPrice*1.05,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점 5%익절") and c <= P5 Then
ExitLong("타점 5%익절 P5청산",AtLimit,P5,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점 5%익절 P5청산") and c <= P382 Then
ExitLong("타점 5%익절 P382청산",AtLimit,P382,"",Floor(베팅금/타점)*0.4);
if (LatestEntryName(0) == "타점") and Condition1 == False Then
ExitLong("타점 10%익절",AtLimit,AvgEntryPrice*1.2,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점 10%익절") and c <= P618 Then
ExitLong("타점 10%익절 P618청산",AtLimit,P618,"",Floor(베팅금/타점)*0.2);
if (LatestExitName(0) == "타점 10%익절 P618청산") and c <= P5 Then
ExitLong("타점 10%익절 P5청산",AtLimit,P5,"",Floor(베팅금/타점)*0.2);
if (LatestEntryName(0) == "타점1")Then
ExitLong("타점1 5%익절",AtLimit,latestEntryPrice*1.05,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점1 5%익절") and c <= P618 Then
ExitLong("타점1 5%익절 P618청산",AtLimit,P618,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점1 5%익절 P618청산") and c <= 5 Then
ExitLong("타점1 5%익절 P5청산",AtLimit,P5,"",Floor(베팅금/타점)*0.4);
if (LatestEntryName(0) == "타점1") Then
ExitLong("타점1 10%익절",AtLimit,latestEntryPrice*1.1,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점1 10%익절") and c <= P618 Then
ExitLong("타점1 10%익절 P618청산",AtLimit,P618,"",Floor(베팅금/타점)*0.2);
if (LatestExitName(0) == "타점1 10%익절 P618청산") and c <= P5 Then
ExitLong("타점1 10%익절 P5청산",AtLimit,P5,"",(베팅금/타점)*0.2);
if (LatestEntryName(0) == "타점2")Then
ExitLong("타점2 5%익절",AtLimit,latestEntryPrice*1.05,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점2 5%익절") and c <= P618 Then
ExitLong("타점2 5%익절 P618청산",AtLimit,P618,"",Floor(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점2 5%익절 P618청산") and c <= 5 Then
ExitLong("타점2 5%익절 P5청산",AtLimit,P5,"",Floor(베팅금/타점)*0.4);
if (LatestEntryName(0) == "타점2") Then
ExitLong("타점2 10%익절",AtLimit,latestEntryPrice*1.1,"",(베팅금/타점)*0.3);
if (LatestExitName(0) == "타점2 10%익절") and c <= P618 Then
ExitLong("타점2 10%익절 P618청산",AtLimit,P618,"",Floor(베팅금/타점)*0.2);
if (LatestExitName(0) == "타점2 10%익절 P618청산") and c <= P5 Then
ExitLong("타점2 10%익절 P5청산",AtLimit,P5,"",Floor(베팅금/타점)*0.2);
}
if MarketPosition == 1 and sTime > xtime and 손절 >= c Then
ExitLong("손절");
if MarketPosition == 1 and (LatestEntryName(0) == "타점1") and c <= latestEntryPrice*0.96 Then
ExitLong("5%돌파손절");
if MarketPosition == 1 and (LatestEntryName(0) == "타점2") and c <= latestEntryPrice*0.96 Then
ExitLong("10%돌파손절");
2024-03-10
935
글번호 177327