커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1417
글번호 230811
david200 님에 의해서 삭제되었습니다.
2024-05-07
23
글번호 179190
답변완료
좋은 한주 되십시요^^ 지표요청 드립니다.
* 연휴 이후 후유중에 저도 힘드네요^^
그래도 좋은 한주 되십시요^^
* 점찍기 요청 드립니다.
올리신 내용이 이전 78545와 어떤 내용이 다른지 모르겠습니다.
혹시 이평들 기울기 정배열이나 역배열로 표현하신 부분이
모두 상승이나 모두 하락을 의미하시는 내용이면 아래식 이용하시면 됩니다.
var : TL(0);
var1 = ma(C,5);
var2 = ma(C,10);
var3 = ma(C,20);
var4 = ma(C,60);
if var1 > var1[1] Then
value1 = 1;
if var1 < var1[1] Then
value1 = -1;
if var2 > var2[1] Then
value2 = 1;
if var2 < var2[1] Then
value2 = -1;
if var3 > var3[1] Then
value3 = 1;
if var3 < var3[1] Then
value3 = -1;
if var4 > var4[1] Then
Value4 = 1;
if var4 < var4[1] Then
value4 = -1;
Condition1 = value1 == 1 and Value2 == 1 and Value3 == 1 and Value4 == 1;
Condition2 = value1 == -1 and Value2 == -1 and Value3 == -1 and Value4 == -1;
if Condition1 == true and Condition1[1] == False Then
{
TL = TL_new(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Red);
}
if Condition2 == true and Condition2[1] == False Then
{
TL = TL_new(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Blue);
}
즐거운 하루되세요
기울기 정배열은 내용파악이 되지 않습니다.
이평정배열/역배열로 작성해 드립니다.
var : TL(0);
var1 = ma(C,5);
var2 = ma(C,10);
var3 = ma(C,20);
var4 = ma(C,60);
Condition1 = var1 > Var2 and Var2 > var3 and Var3 > Var4;
Condition2 = var1 < Var2 and Var2 < var3 and Var3 < Var4;
if Condition1 == true and Condition1[1] == False Then
{
TL = TL_new(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Red);
}
if Condition2 == true and Condition2[1] == False Then
{
TL = TL_new(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL,Blue);
}
즐거운 하루되세요
3가지 이평이 겹치는 구간은
정배열이나 역배열이 아닌구간입니다.
정배열이나 역배열이 아니면 봉에 강조가 표현되게 하시면 됩니다.
var1 = ma(c,10);
Var2 = ma(C,20);
Var3 = ma(C,30);
Condition1 = var1 > Var2 and Var2 > Var3;
Condition2 = var1 < Var2 and Var2 < Var3;
if Condition1 == False and Condition2 == False Then
{
PlotPaintBar(H,L,"강조",Green);
}
즐거운 하루되세요
2024-10-05
874
글번호 179185
답변완료
수식 부탁드립니다.
아래의 수식을 17부터 다음날 05 시50에 강제 종료하고1 파라볼릭 신호 발생 시 최초 진입시는 실시간 진입하는 걸로 변경 부탁드립니다.
Input : af(0.02), maxAF(0.2);
Var : Sarv(0);
Sarv = sar(af,maxAF);
if tcond == true Then
{
If crossup(c,Sarv) Then
{
Buy("b");
}
If CrossDown(c,Sarv) Then
{
Sell("s");
}
}
2024-05-07
731
글번호 179176
산수유 님에 의해서 삭제되었습니다.
2024-05-07
0
글번호 179175
산수유 님에 의해서 삭제되었습니다.
2024-05-07
0
글번호 179174
답변완료
시스템 식 바랍니다
지수선물 적용 예정입니다
1. 조건 99 가 참 일 경우 당일 동시 호가 종가에 매수 진입 한다
2. 조건 99 가 거짓 일 경우 당일 동시 호가 종가에 매도 진입 한다
2024-05-07
892
글번호 179172
답변완료
검색식 부탁드립니다. _(_ _)_
도와주심에 항상 감사드립니다. _(__)_
아래의 a수식의 기준을 충족하는 기준봉이
1.1봉전에 나오고 0봉전에 90일선을 시가갭으로 돌파하는 종목검색식과
2.2봉전에 나오고 0봉전에 90일선을 시가갭으로돌파하는 검색식을 부탁드립니다.
a수식 var : Month(0), MOpen(0), 중심(0),PreMC(0), PreMO(0);
Month = Floor(date/100);
if Month != Month[1] Then {
PreMC = C[1];
PreMO = MOpen;
MOpen = O ;
}
중심 = ((PreMC + PreMO)/2 + MOpen)/2;
if CrossUp(C, 중심) Then Find(1);
세번째는 현재 주가가 엔벨로프지지선(20,10) 아래에 있으면서 0봉전에 아래의 b수식을 돌파하는 종목검색식입니다.
b수식 var1 = macd(12,26);
var2 = Sar(0.02,0.2);
if var1 >= 0 and CrossUp(c,Var2) and C >= C[1]*1.03 and C > O Then
value1 = (C+O)/2;
if value1 > 0 and CrossUp(c,value1) Then
Find(1);
그리고 마지막으로 1봉전 20봉이내에 90일선을 시가로 돌파하는 갭봉이 나오고 0봉전에서 그 90일선갭봉을 돌파하는 검색식도 부탁드립니다.
먼저 갭봉이 시가를 지켜주는 음봉일 경우에는 음봉시가 돌파시 검색, 양봉일 경우에는 양봉종가를 돌파하는 경우에 검색될 수 있게 부탁드리겠습니다. _(__)_
2024-05-07
836
글번호 179171
답변완료
수식변환 부탁드립니다.
안녕하세요!
다음 파인스크립트 수식을 예스로 변환 부탁드립니다.
감사합니다.
//@version=5
indicator("Linear Regression Channel", shorttitle="LinReg", overlay=true)
lengthInput = input.int(100, title="Length", minval = 1, maxval = 600)
sourceInput = input.source(close, title="Source")
group1 = "Channel Settings"
useUpperDevInput = input.bool(true, title="Upper Deviation", inline = "Upper Deviation", group = group1)
upperMultInput = input.float(2.0, title="", inline = "Upper Deviation", group = group1)
useLowerDevInput = input.bool(true, title="Lower Deviation", inline = "Lower Deviation", group = group1)
lowerMultInput = input.float(2.0, title="", inline = "Lower Deviation", group = group1)
group2 = "Display Settings"
showPearsonInput = input.bool(true, "Show Pearson's R", group = group2)
extendLeftInput = input.bool(false, "Extend Lines Left", group = group2)
extendRightInput = input.bool(true, "Extend Lines Right", group = group2)
extendStyle = switch
extendLeftInput and extendRightInput => extend.both
extendLeftInput => extend.left
extendRightInput => extend.right
=> extend.none
group3 = "Color Settings"
colorUpper = input.color(color.new(color.blue, 85), "", inline = group3, group = group3)
colorLower = input.color(color.new(color.red, 85), "", inline = group3, group = group3)
calcSlope(source, length) =>
max_bars_back(source, 600)
if not barstate.islast or length <= 1
[float(na), float(na), float(na)]
else
sumX = 0.0
sumY = 0.0
sumXSqr = 0.0
sumXY = 0.0
for i = 0 to length - 1 by 1
val = source[i]
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
average = sumY / length
intercept = average - slope * sumX / length + slope
[slope, average, intercept]
[s, a, i] = calcSlope(sourceInput, lengthInput)
startPrice = i + s * (lengthInput - 1)
endPrice = i
var line baseLine = na
if na(baseLine) and not na(startPrice)
baseLine := line.new(bar_index - lengthInput + 1, startPrice, bar_index, endPrice, width=1, extend=extendStyle, color=color.new(colorLower, 0))
else
line.set_xy1(baseLine, bar_index - lengthInput + 1, startPrice)
line.set_xy2(baseLine, bar_index, endPrice)
na
calcDev(source, length, slope, average, intercept) =>
upDev = 0.0
dnDev = 0.0
stdDevAcc = 0.0
dsxx = 0.0
dsyy = 0.0
dsxy = 0.0
periods = length - 1
daY = intercept + slope * periods / 2
val = intercept
for j = 0 to periods by 1
price = high[j] - val
if price > upDev
upDev := price
price := val - low[j]
if price > dnDev
dnDev := price
price := source[j]
dxt = price - average
dyt = val - daY
price -= val
stdDevAcc += price * price
dsxx += dxt * dxt
dsyy += dyt * dyt
dsxy += dxt * dyt
val += slope
stdDev = math.sqrt(stdDevAcc / (periods == 0 ? 1 : periods))
pearsonR = dsxx == 0 or dsyy == 0 ? 0 : dsxy / math.sqrt(dsxx * dsyy)
[stdDev, pearsonR, upDev, dnDev]
[stdDev, pearsonR, upDev, dnDev] = calcDev(sourceInput, lengthInput, s, a, i)
upperStartPrice = startPrice + (useUpperDevInput ? upperMultInput * stdDev : upDev)
upperEndPrice = endPrice + (useUpperDevInput ? upperMultInput * stdDev : upDev)
var line upper = na
lowerStartPrice = startPrice + (useLowerDevInput ? -lowerMultInput * stdDev : -dnDev)
lowerEndPrice = endPrice + (useLowerDevInput ? -lowerMultInput * stdDev : -dnDev)
var line lower = na
if na(upper) and not na(upperStartPrice)
upper := line.new(bar_index - lengthInput + 1, upperStartPrice, bar_index, upperEndPrice, width=1, extend=extendStyle, color=color.new(colorUpper, 0))
else
line.set_xy1(upper, bar_index - lengthInput + 1, upperStartPrice)
line.set_xy2(upper, bar_index, upperEndPrice)
na
if na(lower) and not na(lowerStartPrice)
lower := line.new(bar_index - lengthInput + 1, lowerStartPrice, bar_index, lowerEndPrice, width=1, extend=extendStyle, color=color.new(colorUpper, 0))
else
line.set_xy1(lower, bar_index - lengthInput + 1, lowerStartPrice)
line.set_xy2(lower, bar_index, lowerEndPrice)
na
linefill.new(upper, baseLine, color = colorUpper)
linefill.new(baseLine, lower, color = colorLower)
float trend = math.sign(startPrice - endPrice)
alertcondition(sourceInput > line.get_price(upper, bar_index) or sourceInput < line.get_price(lower, bar_index), title='Regression Channel Exited', message="The price movement has exited Regression Channel's bounds")
alertcondition(trend[1] >= 0 and trend < 0, title='Switched to Uptrend', message='The Regression Channel trend switched from Downtrend to Uptrend')
alertcondition(trend[1] <= 0 and trend > 0, title='Switched to Downtrend', message='The Regression Channel trend switched from Uptrend to Downtrend')
// Pearson's R
var label r = na
label.delete(r[1])
if showPearsonInput and not na(pearsonR)
r := label.new(bar_index - lengthInput + 1, lowerStartPrice, str.tostring(pearsonR, "#.################"), color = color.new(color.white, 100), textcolor=color.new(colorUpper, 0), size=size.normal, style=label.style_label_up)
2024-05-07
1143
글번호 179170
답변완료
시스템식 부탁 드립니다.
input : 시작일(20230425),시작시간(090000);
input : 이평1(30),이평2(60),이평3(3600);
input : 윌리엄스R기간값(70);
input : 손절틱수(500),트레일링스탑틱수(380),목표틱수(400),청산틱수(450);
var : mav1(0),mav2(0),mav3(0),WR(0);
if Bdate >= 시작일 and sTime >= 시작시간 Then
Condition1 = true;
MAV1 = MA(c,이평1);
MAV2 = MA(c,이평2);
MAV3 = MA(c,이평3);
WR = WILLR(윌리엄스R기간값);
if Condition1 == true Then
{
if MarketPosition == 0 and c > mav3 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then
if CrossDown(C,mav2) Then
ExitLong("bx");
}
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
위의 수식에서 손절이 되엇을때 더이상 진입이 되지 않게 하는 것을
1번 손절과 2번손절로 구분해서 수식 추가 부탁 드립니다.
2024-05-07
802
글번호 179169