커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
6137
글번호 230811
지표
답변완료

부탁드립니다

수고하십니다아래수식을 오류 없게 수정부탁드립니다 //※※==>내부함수의입력값 2개 필요 수정요망??? 오류부분Inputs: PivotLength(10), TrendLength(50), ShowProfile(true), ColorUp(Blue), ColorDn(Red);Variables: i(0), j(0), k(0), PH(0), PL(0), HighestH(0), LowestL(0), TrendLine(0), ATRValue(0), IsTrendUp(false), PivotDetected(false), StartBar(0), // Volume Profile 관련 TopPrice(0), BotPrice(0), Levels(0), StepSize(0), MidPrice(0), // POC 관련 POCPrice(0), POCVolume(0), POCBar(0), // Drawing Objects TLRef(0), TextRef(0), POCLineRef(0), PivotTextRef(0), // 색상 CurrentColor(0), ProfileColor(0), // Pivot 라벨 위치 PivotY(0), // Volume Profile 바 너비 BarWidth(0);Arrays: VolumeBins[1000](0), VPLines[1000](0), VPStartBars[100](0), VPEndBars[100](0);// ATR 계산ATRValue = ATR(200) * 0.1;// Pivot 감지PH = 0;PL = 0;// Pivot High 감지if CurrentBar > PivotLength * 2 then begin if High[PivotLength] == Highest(High, 2 * PivotLength + 1) then PH = High[PivotLength];end;// Pivot Low 감지if CurrentBar > PivotLength * 2 then begin if Low[PivotLength] == Lowest(Low, 2 * PivotLength + 1) then PL = Low[PivotLength];end;// 트렌드 계산HighestH = Highest(High, TrendLength);LowestL = Lowest(Low, TrendLength);TrendLine = (HighestH + LowestL) / 2;// 트렌드 방향 결정if High == HighestH then IsTrendUp = true;if Low == LowestL then IsTrendUp = false;// 색상 설정if IsTrendUp == false then CurrentColor = ColorUp;else CurrentColor = ColorDn;// Pivot 감지PivotDetected = false;if IsTrendUp == false then begin if PH > 0 then PivotDetected = true;end else begin if PL > 0 then PivotDetected = true;end;// Volume Profile 계산if CurrentBar - PivotLength - StartBar > PivotLength then begin if PivotDetected then begin // 이전 POC 라인 연장 if POCLineRef > 0 then begin TL_SetEnd(POCLineRef, Date[PivotLength], Time[PivotLength], POCPrice); end; StartBar = CurrentBar - PivotLength; // 경계 설정 TopPrice = High[PivotLength]; BotPrice = Low[PivotLength]; for i = 0 to PivotLength * 2 begin if High[i] > TopPrice then TopPrice = High[i]; if Low[i] < BotPrice then BotPrice = Low[i]; end; // 레벨 계산 if ATRValue > 0 and (TopPrice - BotPrice) > 0 then begin Levels = IntPortion((TopPrice - BotPrice) / ATRValue); if Levels < 1 then Levels = 1; if Levels > 999 then Levels = 999; StepSize = (TopPrice - BotPrice) / Levels; // Volume Bins 초기화 for k = 0 to Levels begin VolumeBins[k] = 0; end; // Volume 수집 for i = 0 to PivotLength * 2 begin for k = 0 to Levels begin MidPrice = BotPrice + StepSize * k + StepSize / 2; if AbsValue(MidPrice - Close[i]) <= StepSize * 2 then VolumeBins[k] = VolumeBins[k] + Volume[i]; end; end; // POC (Point of Control) 찾기 POCVolume = 0; POCPrice = 0; POCBar = 0; for k = 0 to Levels begin if VolumeBins[k] > POCVolume then begin POCVolume = VolumeBins[k]; MidPrice = BotPrice + StepSize * k + StepSize / 2; POCPrice = MidPrice; // POC 바 위치 계산 (Volume 비율에 따라) if POCVolume > 0 then POCBar = Round((VolumeBins[k] / POCVolume) * PivotLength); //※※==>내부함수의입력값 2개 필요 수정요망??? else POCBar = 0; end; end; // Volume Profile 시각화 (Profile이 켜져 있을 때만) if ShowProfile then begin // 이전 Volume Profile 라인 삭제 for k = 0 to Levels begin if VPLines[k] > 0 then begin TL_Delete(VPLines[k]); VPLines[k] = 0; end; end; // Volume Profile 히스토그램 그리기 for k = 0 to Levels begin if VolumeBins[k] > 0 then begin MidPrice = BotPrice + StepSize * k + StepSize / 2; // 바 너비 계산 (최대 Volume 대비 비율) if POCVolume > 0 then BarWidth = Round((VolumeBins[k] / POCVolume) * PivotLength); //※※==>내부함수의입력값 2개 필요 수정요망??? else BarWidth = 0; // Volume Profile 바 그리기 if BarWidth > 0 then begin VPLines[k] = TL_New( Date[PivotLength], Time[PivotLength], MidPrice, Date[PivotLength - BarWidth], Time[PivotLength - BarWidth], MidPrice ); TL_SetColor(VPLines[k], CurrentColor); TL_SetSize(VPLines[k], 3); end; end; end; // POC 라인 그리기 if POCPrice > 0 and POCBar > 0 then begin if POCLineRef > 0 then TL_Delete(POCLineRef); POCLineRef = TL_New( Date[PivotLength - POCBar], Time[PivotLength - POCBar], POCPrice, Date[PivotLength - POCBar - 15], Time[PivotLength - POCBar - 15], POCPrice ); TL_SetColor(POCLineRef, CurrentColor); TL_SetSize(POCLineRef, 2); TL_SetExtRight(POCLineRef, false); // POC 라벨 if TextRef > 0 then Text_Delete(TextRef); TextRef = Text_New( Date[PivotLength - POCBar], Time[PivotLength - POCBar], POCPrice, NumToStr(POCVolume, 0) ); Text_SetColor(TextRef, CurrentColor); end; // Pivot 마커 if PivotTextRef > 0 then Text_Delete(PivotTextRef); if IsTrendUp == false then begin // Pivot High PivotY = PH; PivotTextRef = Text_New( Date[PivotLength], Time[PivotLength], PivotY, "●" ); Text_SetColor(PivotTextRef, CurrentColor); Text_SetLocation(PivotTextRef, Date[PivotLength], Time[PivotLength], PivotY + StepSize); end else begin // Pivot Low PivotY = PL; PivotTextRef = Text_New( Date[PivotLength], Time[PivotLength], PivotY, "●" ); Text_SetColor(PivotTextRef, CurrentColor); Text_SetLocation(PivotTextRef, Date[PivotLength], Time[PivotLength], PivotY - StepSize); end; end; end; end;end;// POC 라인을 현재 바까지 계속 연장if POCLineRef > 0 and POCPrice > 0 then begin TL_SetEnd(POCLineRef, Date, Time, POCPrice);end;// 트렌드 라인 플롯Plot1(TrendLine, "Trend", CurrentColor, Def, 4);// POC 레벨 플롯 (Profile이 꺼져 있을 때)if ShowProfile == False and POCPrice > 0 then Plot2(POCPrice, "POC Level", CurrentColor, Def, 2);else NoPlot(2);
프로필 이미지
파생돌이
2025-10-28
929
글번호 227384
지표
답변완료

부탁드립니다

수고하십니다아래수식을 오류 없게 수정부탁드립니다Inputs: Period(200), VPResolution(50), ShowPoC(true), ShowPivots(true), PivotLength(10), PivotFilter(20);Variables: i(0), j(0), k(0), HighestPrice(0), LowestPrice(0), BinSize(0), BinLow(0), BinHigh(0), BinMid(0), BinValue(0), MaxBinValue(0), VolPercent(0), Left(0), Right(0), PocPrice(0), PocVolume(0), TotalDelta(0), CurrentDelta(0), // Pivot 관련 PH(0), PL(0), PivotPrice(0), PivotBar(0), PivotIndex(0), // Drawing Objects TLRef(0), TextRef(0), RectRef(0), // 색상 ProfileColor(0), BarColor(0);Arrays: VolumeBins[100](0), DeltaBins[100](0), PivotPrices[500](0), PivotBars[500](0), PivotTypes[500](0), // 1 = High, -1 = Low PivotProcessed[500](0), // 0 = not processed, 1 = processed VPTrendLines[100](0), VPLabels[100](0);// 이전 Drawing Objects 삭제 (마지막 바에서만)if Date <> Date[1] or Time <> Time[1] then begin for i = 0 to VPResolution - 1 begin if VPTrendLines[i] > 0 then begin TL_Delete(VPTrendLines[i]); VPTrendLines[i] = 0; end; if VPLabels[i] > 0 then begin Text_Delete(VPLabels[i]); VPLabels[i] = 0; end; end;end;// Pivot High 감지PH = 0;if CurrentBar > PivotLength * 2 then begin if High[PivotLength] == Highest(High, 2 * PivotLength + 1) then PH = High[PivotLength];end;// Pivot Low 감지PL = 0;if CurrentBar > PivotLength * 2 then begin if Low[PivotLength] == Lowest(Low, 2 * PivotLength + 1) then PL = Low[PivotLength];end;// Pivot 저장 및 처리if PH > 0 then begin PivotIndex = -1; // 빈 슬롯 찾기 for i = 0 to 499 begin if PivotBars[i] = 0 then begin PivotIndex = i; break; end; end; if PivotIndex >= 0 then begin PivotPrices[PivotIndex] = PH; PivotBars[PivotIndex] = CurrentBar - PivotLength; PivotTypes[PivotIndex] = 1; // High PivotProcessed[PivotIndex] = 0; end;end;if PL > 0 then begin PivotIndex = -1; // 빈 슬롯 찾기 for i = 0 to 499 begin if PivotBars[i] = 0 then begin PivotIndex = i; break; end; end; if PivotIndex >= 0 then begin PivotPrices[PivotIndex] = PL; PivotBars[PivotIndex] = CurrentBar - PivotLength; PivotTypes[PivotIndex] = -1; // Low PivotProcessed[PivotIndex] = 0; end;end;// Volume Profile 계산 및 시각화if CurrentBar >= Period then begin // 범위 계산 HighestPrice = Highest(High, Period); LowestPrice = Lowest(Low, Period); if HighestPrice > LowestPrice then begin BinSize = (HighestPrice - LowestPrice) / VPResolution; // Bins 초기화 for i = 0 to VPResolution - 1 begin VolumeBins[i] = 0; DeltaBins[i] = 0; end; // Volume 데이터 수집 for j = 0 to Period - 1 begin for i = 0 to VPResolution - 1 begin BinLow = LowestPrice + BinSize * i; BinHigh = BinLow + BinSize; if Close[j] >= BinLow - BinSize and Close[j] < BinHigh + BinSize then begin VolumeBins[i] = VolumeBins[i] + Volume[j]; // Delta 계산 if Close[j] > Open[j] then DeltaBins[i] = DeltaBins[i] + Volume[j]; else DeltaBins[i] = DeltaBins[i] - Volume[j]; end; end; end; // 최대 Volume 찾기 MaxBinValue = 0; for i = 0 to VPResolution - 1 begin if VolumeBins[i] > MaxBinValue then MaxBinValue = VolumeBins[i]; end; // PoC 및 Total Delta 계산 PocVolume = 0; PocPrice = 0; TotalDelta = 0; for i = 0 to VPResolution - 1 begin TotalDelta = TotalDelta + DeltaBins[i]; if VolumeBins[i] > PocVolume then begin PocVolume = VolumeBins[i]; BinLow = LowestPrice + BinSize * i; BinHigh = BinLow + BinSize; PocPrice = (BinLow + BinHigh) / 2; end; end; // 색상 결정 (Delta 기반) if TotalDelta > 0 then ProfileColor = Cyan; else ProfileColor = Red; // Volume Profile 히스토그램 그리기 (마지막 바에서만) if LastBarOnChart then begin Left = CurrentBar - Period; for i = 0 to VPResolution - 1 begin BinLow = LowestPrice + BinSize * i; BinHigh = BinLow + BinSize; BinMid = (BinLow + BinHigh) / 2; BinValue = VolumeBins[i]; if MaxBinValue > 0 then begin VolPercent = (BinValue / MaxBinValue) * 100; Right = Left + Round((BinValue / MaxBinValue) * 50); // Delta 기반 색상 if DeltaBins[i] > 0 then BarColor = Cyan else BarColor = Red; // Volume Profile 바 그리기 (TrendLine 사용) if VPTrendLines[i] > 0 then TL_Delete(VPTrendLines[i]); VPTrendLines[i] = TL_New(Date[Period], Time[Period], BinMid, Date[Period - Right + Left], Time[Period - Right + Left], BinMid); TL_SetColor(VPTrendLines[i], BarColor); TL_SetSize(VPTrendLines[i], 4); // Pivot과 Volume Profile 교차점 표시 if ShowPivots then begin for k = 0 to 499 begin if PivotBars[k] > 0 and PivotProcessed[k] = 0 then begin PivotPrice = PivotPrices[k]; PivotBar = PivotBars[k]; // Pivot이 Volume Profile 범위 내에 있고 필터 조건 만족 if AbsValue(BinMid - PivotPrice) <= BinSize and VolPercent >= PivotFilter and CurrentBar - Period <= PivotBar then begin // Pivot 라인 그리기 if PivotTypes[k] = 1 then begin // Pivot High TLRef = TL_New(Date[CurrentBar - PivotBar + PivotLength], Time[CurrentBar - PivotBar + PivotLength], PivotPrice, Date[CurrentBar - PivotBar - PivotLength], Time[CurrentBar - PivotBar - PivotLength], PivotPrice); TL_SetColor(TLRef, DarkRed); TL_SetSize(TLRef, 2); // 라벨 추가 TextRef = Text_New(Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice, NumToStr(BinValue, 0) + " (" + NumToStr(VolPercent, 0) + "%)"); Text_SetColor(TextRef, DarkRed); Text_SetLocation(TextRef, Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice + BinSize); // 연장선 그리기 (Dotted) TLRef = TL_New(Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice, Date, Time, PivotPrice); TL_SetColor(TLRef, DarkRed); TL_SetStyle(TLRef, Tool_Dotted); TL_SetExtRight(TLRef, True); end else begin // Pivot Low TLRef = TL_New(Date[CurrentBar - PivotBar + PivotLength], Time[CurrentBar - PivotBar + PivotLength], PivotPrice, Date[CurrentBar - PivotBar - PivotLength], Time[CurrentBar - PivotBar - PivotLength], PivotPrice); TL_SetColor(TLRef, DarkGreen); TL_SetSize(TLRef, 2); // 라벨 추가 TextRef = Text_New(Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice, NumToStr(VolPercent, 0) + "% (" + NumToStr(BinValue, 0) + ")"); Text_SetColor(TextRef, DarkGreen); Text_SetLocation(TextRef, Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice - BinSize); // 연장선 그리기 (Dotted) TLRef = TL_New(Date[CurrentBar - PivotBar], Time[CurrentBar - PivotBar], PivotPrice, Date, Time, PivotPrice); TL_SetColor(TLRef, DarkGreen); TL_SetStyle(TLRef, Tool_Dotted); TL_SetExtRight(TLRef, True); end; PivotProcessed[k] = 1; end; end; end; end; end; end; end; end;end;// 오래된 Pivot 제거for i = 0 to 499 begin if PivotBars[i] > 0 and CurrentBar - PivotBars[i] > Period then begin PivotBars[i] = 0; PivotPrices[i] = 0; PivotTypes[i] = 0; PivotProcessed[i] = 0; end;end;// PoC 레벨 표시if ShowPoC and PocPrice > 0 then begin Plot1(PocPrice, "PoC Level", ProfileColor, Default, 2); // PoC 라벨 (마지막 바에서만) if LastBarOnChart then begin TextRef = Text_New(Date, Time, PocPrice, "POC: " + NumToStr(PocVolume, 0)); Text_SetColor(TextRef, ProfileColor); Text_SetLocation(TextRef, Date, Time, PocPrice); end;end;
프로필 이미지
파생돌이
2025-10-28
978
글번호 227383
지표
답변완료

수식 요청드립니다.

안녕하세요.매수진입 수식 1개로 피라미딩 진입하여 최대 5개까지 누적 매수 한다고 했을 시첫번째 매수진입 이후에는 첫번째 매수진입 시점부터 10분이상 경과 + 매수진입 조건 달성시 두번째 매수진입두번째 매수진입 시점부터 10분이상 경과 + 매수진입 조건 달성시 세번째 매수진입세번째 매수진입 시점부터 10분이상 경과 + 매수진입 조건 달성시 네번째 매수진입네번째 매수진입 시점부터 10분이상 경과 + 매수진입 조건 달성시 다섯번째 매수진입할수 있도록 하는 수식을 부탁드립니다. 감사합니다.
프로필 이미지
트레이더365
2025-10-28
247
글번호 227382
시스템

파생돌이 님에 의해서 삭제되었습니다.

프로필 이미지
파생돌이
2025-10-27
10
글번호 227381
지표
답변완료

종목검색 수식완성 부탁드립니다.

안녕하세요. 종목검색 수식 부탁드립니다.◆조건 1. 금일 첫 30분봉에서 ADX(10) > 25 이고, CrossUp(DI⁺, ADX) ◆조건 2. Chaikin Oscillator (3,10) 금일 첫 30분봉의 CO 값이 전일 마지막 30분봉 CO의 1.5배 이상 AND 금일 첫 30분봉 CO ≥ 0 ◆조건 3. 금일 첫 30분봉에서 RSI(14) 52 상향돌파 이상 세가지 조건을 만족하는 종목을 검색하는 수식을 부탁드립니다.감사합니다.
ADX RSI ChaikinOscillator
프로필 이미지
행복사랑채
2025-10-27
1109
글번호 227378
종목검색
답변완료

부탁 드립니다.

Input : P(10); Var : LRLv(0); LRLv = LRL(C, P); Var1 = LRLv; Var2 = Var1[1];Plot1(var1); plot2(Var2); Print("C:\\WinnerData\\realtime_mymz25.csv", "%.f,%.f,%.f,%.1f,%.1f,%.f", Date, Time, Close, Var1, Var2, DayClose(1));위 수식에서 C:\WinnerData\realtime_mymz25.csv 의 출력에서 Date 의 출력 형식이 '2025-10-27 17:40:00 20251027' 와 같이 출력이 됩니다. Date 출력 형식에서 20251027(YYYYMMDD) 와 같이 년월일 만 출력이 되도록 수식을 변경 하여 주시면 감사하겠습니다.C:\WinnerData\realtime_mymz25.csv 출력내용2025-10-27 17:40:00 20251027 173204 47654 47767 .1 47768.8 47387Date : 2025-10-27-27 17:40:00 20251027 -------> 여기서 20251027 만 출력 되게 해 주십시요. (2025-10-27 17:40:00 이 부분이 없어야 합니다)아래의 항목들은 정상적으로 출력 됩니다.Time : 173204 Close : 47654var1 : 47767.1 var2 : 47768.8 DayClose(1) : 47387
Print csv
프로필 이미지
너무조아
2025-10-27
679
글번호 227371
지표
답변완료

종목검색 문의 드립니다

오늘 하루중 5분봉상 RSI가 70이상 올라갔던 종목을 장끝나고 찾아볼수 있는 검색식 어떻게 될까요?
RSI
프로필 이미지
비리번
2025-10-27
269
글번호 227369
종목검색
답변완료

부탁드립니다

1,A= Disparity(Period); D=ValueWhen(1, crossup(A, 기준) OR crossdown(A, 기준) ,가격)지표조건 period 120 기준 101 가격 (H+L)/2D지표값이 10%이상하락 했다 N일전에 하락하고 오늘 까지 하락한 지표값이 유지중인 종목 검색식 부탁 드립니다 N일은 5일 7일 10일 등등 입니다2,A1=Highest(V,기간1);B1=Valuewhen(1,V>A1(1),(O+C+L+H+C)/5);지표조건기간1 60B1지표값이 10%이상하락 했다 N일전에 하락하고 오늘 까지 하락한 지표값이 유지중인 종목 검색식 부탁 드립니다 N일은 5일 7일 10일 등등 입니다
프로필 이미지
님이랑
2025-10-27
335
글번호 227346
종목검색
답변완료

Data2(지수C)

data2()로 종합주가지수 최근 종가 다른 지표에서 참조하여 그 지표에 화면출력하는 코드부탁합니다.
프로필 이미지
dedoyes
2025-10-27
288
글번호 227342
지표