커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1397
글번호 230811
답변완료
문의드립니다.
if 1+2+3 then
Buy("b1",OnClosE,DeF,진입수량1);
if 1+2 then
Buy("b2",OnClosE,DeF,진입수량1);
위의 경우 1+2+3을 만족할 경우 bi만 진입하고 b2는 진입안하게 하는 수식좀 부탁드립니다.
2024-06-19
629
글번호 180769
살빼고싶다 님에 의해서 삭제되었습니다.
2024-06-19
115
글번호 180768
요타 님에 의해서 삭제되었습니다.
2024-06-19
2
글번호 180766
답변완료
문의드립니다.
미결제약정을 공부중인데 plot(oi);출력시 종가기준으로만 나오더라구요.분봉처럼 시고저종 기준으로 표시할방법이없을까요?타주기참조해도 될것같긴한데 그러면 dayindex 첫봉시가기준이아닌 타주기종가가 시가로 표시될것같고 어떻게 작성해야할까요?답변부탁드립니다.
2024-06-19
667
글번호 180765
답변완료
검색식 부탁드립니다. _(_ _)_
도와주심에 감사드립니다. _(__)_
1봉전 30봉이내에서 1수식을 만족시키는 봉이 출현하고 0봉전에서 각각 2수식과 3수식을
만족시키는 종목 검색식을 부탁드립니다.
두가지 검색식이 되겠습니다. 1수식과 2수식조건, 1수식과 3수식조건
1수식
var : m5(0),m20(0),크로스업(False),hh(0),H_high(0),ll(0),L_sum(0),ls(0),조건(false),cnt(-1);
M5 = ma(c,5);
M20 = ma(c,20);
크로스업 = crossup(M5,M20);
if 크로스업 == true Then
{
hh = h;
var1 = L_sum[1];
cnt = 0;
}
Else
{
if hh > 0 and h > hh Then
hh = h;
}
if HH==HH[1] && HH > H Then
H_high = HH;
LL = iff(M20>L, 1, 0);
L_sum = Accum(LL);
Ls = L_sum-var1;
조건 = CrossUp(c, H_High) && Ls>0;
if 조건 == true Then
{
if cnt >= 0 Then
{
cnt = cnt+1;
if cnt == 1 Then
Find(1);
}
}
2수식
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);
3수식은 엔벨로프(20,10)지지선이탈후 0봉전 재돌파
2024-06-19
823
글번호 180764
답변완료
검색식 부탁 드려요
1. ADX (14) 침체 20 이하 종목 검색식 부탁합니다.
2. 볼륨 오실레이터(5,20) 0기준선 돌파한 종목(단,5일 연속)검색식 부탁합니다.
3. 종이격 C-C (기간) // 기간 21
을 돌파한 종목(단, 5일 연속) 검색식 부탁드려요
4. 가격 볼린저 밴드(20,2)가 수축된상태에서 처음 상단선을 캔들이 돌파할때,
종목 을 검색하고자 합니다 . 검색식 부탁드려요
5. 6개조건을 모두 만족하는 (단,2일 연속) 검색식 부탁드립니다.
M= Macd(12,26);
Ms=eavg(M,9);
M>Ms 때
S=StochasticsSlow(12,5);
Ss=eavg(S,3);
S>Ss 때
CC=CCi(9);
Cs=eavg(CC,12);
CC>Cs 때
M10=ma(C,10);
C>M10 때
R=Rsi(14);
Rs=eavg(R,9);
R>Rs 때
Dp =DiPlus(14);
Dm=DiMinus(14);
Dp>Dm 때
2024-06-19
795
글번호 180763
답변완료
문의드립니다.
다음 수식의 조건이 3회이상 나타날때 종목검색식을 문의드립니다.
x=highestsince(2,date(1)!=date,if(c>=o,v,0));
a=highestsince(1,date(1)!=date,h);
조건=if(
c>=o&&
h>h(1)&&
v>v(1)&&
v>x(1)&&
h>a(1)
,1,0);
2024-06-19
694
글번호 180762
2wnwn 님에 의해서 삭제되었습니다.
2024-06-19
16
글번호 180761
답변완료
문의 드립니다.
아래 파인스크립트 지표를 예스로 변환 했는데 값이 다르게 나오는데 왜 그런지 모르겠네요.
혹시 체크해 보시고 잘못 변환한 부분이 있는지 체크 부탁드립니다.
plot만 구현하고 히스토그램등 필요없는건 뺐습니다.
//@version=5
// Original concept by David Bostian, with variations featured in "Bollinger on Bollinger Bands".
indicator("Intraday Intensity Modes", 'Intensity')
toolTipA = 'III (Individual):₩nOsc Length 1₩n[ ] Cumulative (Off)₩n[ ] Normalized (Off)₩n[ ] Inverse Volu' +
'me (Off)₩n[ ] Show Levels (Off)₩n₩n'
toolTipB = 'II (Cumulative):₩nOsc Length 1₩n[✓] Cumulative (On)₩n[ ] Normalized (Off)₩n[ ] Inverse Volume ' +
'(Off)₩n[ ] Show Levels (Off)₩n₩n'
toolTipC = 'II% (Oscillator):₩nOsc Length 21₩n[ ] Cumulative (Off)₩n[✓] Normalized (On)₩n[ ] Inverse Volume' +
' (Off)₩n[✓] Show Levels (On)'
toolTipD = 'Enables examination of intensity per bar instead of per day, this is a departure from the original ' +
'concept. Whenever this setting is enabled the indicator should be regarded as operating in an experimental mode.'
toolTipV = '[ ] Inverse Volume (Off):₩n₩n (2 * close - high - low) * volume₩n ────────────────₩n ' +
' high - low₩n₩n₩n[✓] Inverse Volume (On):₩n₩n 2 * close - high - low₩n ───────────' +
'₩n (high - low) * volume'
i_length = input.int (21, 'Osc Length', minval = 1, tooltip = toolTipA + toolTipB + toolTipC)
i_cumltv = input.bool (false, 'Cumulative')
i_normal = input.bool (true, 'Normalized')
i_candle = input.bool (false, 'Intrabar', tooltip = toolTipD)
i_invert = input.bool (false, 'Inverse Volume', tooltip = toolTipV)
i_colrUp = input.color(#00BCD4, 'Colors For Up', inline = 'a')
i_colrDn = input.color(#E040FB, 'Down', inline = 'a')
i_styles = input.string('Columns', 'Style & Width', options = ['Columns', 'Histogram', 'Line'], inline = 'b')
i_widths = input.int (1, '', minval = 1, inline = 'b')
i_shoLvl = input.bool (true, '', inline = 'c')
i_levelH = input.int (25, 'Show Levels Above', inline = 'c')
i_levelL = input.int (-25, 'Below', inline = 'c')
id_cum(source) => // perform cumulative sum once per day when using realtime intraday source values
var carrySum = float(na)
var dailySum = float(na)
if not timeframe.isintraday
carrySum := ta.cum(nz(source))
else
dailySum := timeframe.change('D') ? nz(carrySum) : nz(dailySum)
carrySum := nz(dailySum) + nz(source)
altSum(source, length) => normal = math.sum(nz(source), length) // treat na as 0 and return sum
var idRangeH = float(na)
var idRangeL = float(na)
var idVolume = float(na)
startDay = timeframe.change('D')
idRangeH := not timeframe.isintraday or startDay ? high : high > nz(idRangeH) ? high : idRangeH // intraday high
idRangeL := not timeframe.isintraday or startDay ? low : low < nz(idRangeL, 10e99) ? low : idRangeL // intraday low
idVolume := not timeframe.isintraday or startDay ? volume : nz(idVolume) + volume // intraday volume
idUseVol = i_invert ? 1 / idVolume : idVolume
iiiValue = nz(((2 * close - idRangeH - idRangeL) / (idRangeH - idRangeL)) * idUseVol) // intraday intensity
use_iii = i_invert ?
(2 * close - high - low) / ((high - low) * volume) :
((2 * close - high - low) / (high - low)) * volume
usePrcnt = i_normal ? 100 : 1
iiSource =
usePrcnt * altSum(i_cumltv ? i_candle ? ta.cum(nz(use_iii)) : id_cum(iiiValue) : i_candle ? nz(use_iii) : iiiValue, i_length) /
(i_normal ? altSum(i_cumltv ? i_candle ? ta.cum(volume) : id_cum(idVolume) : i_candle ? volume : idVolume, i_length) : 1)
colrSign = altSum(i_candle ? use_iii : iiiValue, i_length) / (i_normal ? i_candle ? volume : altSum(idVolume, i_length) : 1)
pltStyle = i_styles == 'Columns' ? plot.style_columns : i_styles == 'Histogram' ? plot.style_histogram : plot.style_line
plot(iiSource, 'III, II, or II%', math.sign(colrSign) != -1 ? i_colrUp : i_colrDn, i_widths, pltStyle)
plot(startDay ? 1 : 0, 'startDay', #ffff00, display = display.data_window)
plot(close, 'close', #ffff00, display = display.data_window)
plot(high, 'high', #ffff00, display = display.data_window)
plot(low, 'low', #ffff00, display = display.data_window)
plot(volume, 'volume', #ffff00, display = display.data_window)
plot(idRangeH, 'idRangeH', #ffff00, display = display.data_window)
plot(idRangeL, 'idRangeL', #ffff00, display = display.data_window)
plot(idVolume, 'idVolume', #ffff00, display = display.data_window)
plot(iiiValue, 'iiiValue', #ffff00, display = display.data_window)
plot(iiSource, 'iiSource', #ffff00, display = display.data_window)
hline(i_shoLvl ? i_levelH : na)
hline(i_shoLvl ? i_levelL : na)
변환
Input: OscLength(21);
Input: Cumulative(False);
Input: Normalized(True);
Input: Intrabar(False);
Input: InverseVolume(False);
Input: UpColor(Blue), DownColor(Red);
Input: Width(1);
Input: ShowLevels(True);
Input: LevelHigh(25), LevelLow(-25);
Vars: CarrySum(0), DailySum(0), StartDay(False);
Vars: IDRangeH(0), IDRangeL(0), IDVolume(0), IDUseVol(0), IIIValue(0);
Vars: UseIII(0), UsePrcnt(1), IISource(0), ColrSign(0);
Vars: LineColor(Blue);
Vars: i(0), SumCarrySum(0), SumIDVolume(0), SumDailySum(0);
// 데이터 초기화
if Date <> Date[1] then begin
StartDay = True;
CarrySum = 0;
DailySum = 0;
IDRangeH = High;
IDRangeL = Low;
IDVolume = Volume;
end
else begin
StartDay = False;
IDRangeH = MaxList(IDRangeH, High);
IDRangeL = MinList(IDRangeL, Low);
IDVolume = IDVolume + Volume;
end;
// IDUseVol 값 설정
if InverseVolume then
IDUseVol = 1 / IDVolume;
else
IDUseVol = IDVolume;
IIIValue = ((2 * Close - IDRangeH - IDRangeL) / (IDRangeH - IDRangeL)) * IDUseVol;
if Cumulative then begin
CarrySum = CarrySum + IIIValue;
DailySum = CarrySum;
end
else begin
DailySum = IIIValue;
end;
UseIII = DailySum;
// 데이터 합산 변수 초기화
SumCarrySum = 0;
SumIDVolume = 0;
SumDailySum = 0;
// 데이터 합산 루프
for i = 0 to OscLength - 1 begin
SumCarrySum = SumCarrySum + IIIValue[i];
SumIDVolume = SumIDVolume + IDVolume[i];
SumDailySum = SumDailySum + DailySum[i];
end;
// 데이터 스케일 조정 및 백분율 변환
if Cumulative then begin
IISource = 100 * (SumCarrySum / SumIDVolume);
end
else begin
IISource = 100 * (SumDailySum / SumIDVolume);
end;
// ColrSign 계산
if Normalized then
ColrSign = 100 * (SumDailySum / SumIDVolume);
else
ColrSign = SumDailySum / SumIDVolume;
// LineColor 설정
if ColrSign >= 0 then
LineColor = UpColor;
else
LineColor = DownColor;
Plot1(IISource, "III, II, or II%", LineColor, Width);
if ShowLevels then begin
Plot2(LevelHigh, "LevelHigh");
Plot3(LevelLow, "LevelLow");
end;
2024-06-19
994
글번호 180760