커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식 부탁합니다

안녕하세요! 옵션 전일 매도한 분량을 종목에 관계 없이 당일 장 시작 전 동시호가체결시간(오전 8시 35분)에 시장가로 전량 청산 주문 하는 식 원합니다.
프로필 이미지
팡팡
2023-08-23
1215
글번호 171763
시스템

매버릭 님에 의해서 삭제되었습니다.

프로필 이미지
매버릭
2023-08-23
1
글번호 171761
지표
답변완료

시스템 작성의뢰

수고 하십니다! 1.거래량 5 이평선이 15 이상 상승하면 신호로 알려주고 on balance price 지표가 - 33 이하로 내려가고 obv 지표가 -2400 이하로 하락하고 pvi지표가 99.50 이하로 하락하고 biii지표가 -0.15 이하로 하락 하고 er bear power 지표가 0.00 이상 상승 하고120,240,480,960 ,1920 이동평균선이 역배열이 되고 960 이평선과 1920 이평선의 간격이 7틱이상 벌어지고 120 이평선이 240 이평선을 업크로스할때 6 계약 매수를 하고난 후 30 틱 이상 하락 하면 3 계약 매수를 하고난 후 30 틱 이상 하락 하면 3 계약 매수를 또 하고 60 틱이상 상승한 다음 120 이평선이 240 이평선을 다운크로스 할때 청산을 한다 2.거래량 5 이평선이 15 이상 상승하면 신호로 알려주고 on balance price 지표가 35 이상 상승하고 obv 지표가 200 이상 상승 하고 pvi지표가 100.50 이상 상승 하고 biii 지표가 0.01 이상 상승 하고 er bear power 지표가 - 0.01 이하로 하락 하고 120,240,480,960 ,1920 , 3840 이동평균선이 정배열이 되고 1920 이평선과 3840 이평선의 간격이 16 틱이상 벌어지고 120 이평선이 240 이평선을 다운크로스할때 6 계약 매도를 하고난 후 30 틱 이상 상승 하면 3 계약 매도를 하고난 후 30 틱 이상 상승 하면 3 계약 매도를 또 하고 60 틱이상 하락한 다음 120 이평선이 240 이평선을 업크로스 할때 청산을 한다
프로필 이미지
tnsflwls
2023-08-23
1206
글번호 171760
시스템
답변완료

부탁드립니다

###3분봉 1분봉 에 사용하고싶습니다 1, input : ATrPeriod2(11),factor2(2.0); var : src2(0),ATrv2(0),upperband2(0),lowerBand2(0),direction2(0),superTrend2(0); var : prevupperband2(0),prevlowerBand2(0),prevsupertrend2(0); src2 = (h+l)/2; atrv2 = atr(atrPeriod2); upperBand2 = src2 + factor2 * atrv2; lowerBand2 = src2 - factor2 * atrv2; prevLowerBand2 = iff(IsNan(lowerBand2[1])==False,lowerBand2[1],0); prevUpperBand2 = iff(IsNan(upperBand2[1])==false,upperBand2[1],0); lowerBand2 = iff(lowerBand2 > prevLowerBand2 or close[1] < prevLowerBand2 , lowerBand2 , prevLowerBand2); upperBand2 = iff(upperBand2 < prevUpperBand2 or close[1] > prevUpperBand2 , upperBand2 , prevUpperBand2); prevsupertrend2 = iff(IsNan(SuperTrend2[1])==false,SuperTrend2[1],0); if isnan(atrv2[1]) == true Then direction2 = 1; else if SuperTrend2[1] == UpperBand2[1] Then direction2 = iff(close > upperBand2 , -1 , 1); else direction2 = iff(close < lowerBand2 , 1 , -1); superTrend2 = iff(direction2 == -1 , lowerBand2 , upperBand2); if direction2 < 0 Then Plot3(superTrend2,"upTrend2",Black); Else NoPlot(3); 2, input : ATrPeriod3(12),factor3(3.0); var : src3(0),ATrv3(0),upperband3(0),lowerBand3(0),direction3(0),superTrend3(0); var : prevupperband3(0),prevlowerBand3(0),prevsupertrend3(0); src3 = (h+l)/2; atrv3 = atr(atrPeriod3); upperBand3 = src3 + factor3 * atrv3; lowerBand3 = src3 - factor3 * atrv3; prevLowerBand3 = iff(IsNan(lowerBand3[1])==False,lowerBand3[1],0); prevUpperBand3 = iff(IsNan(upperBand3[1])==false,upperBand3[1],0); lowerBand3 = iff(lowerBand3 > prevLowerBand3 or close[1] < prevLowerBand3 , lowerBand3 , prevLowerBand3); upperBand3 = iff(upperBand3 < prevUpperBand3 or close[1] > prevUpperBand3 , upperBand3 , prevUpperBand3); prevsupertrend3 = iff(IsNan(SuperTrend3[1])==false,SuperTrend3[1],0); if isnan(atrv3[1]) == true Then direction3 = 1; else if prevsupertrend3 == prevUpperBand3 Then direction3 = iff(close > upperBand3 , -1 , 1); else direction3 = iff(close < lowerBand3 , 1 , -1); superTrend3 = iff(direction3 == -1 , lowerBand3 , upperBand3); if direction3 < 0 Then Plot5(superTrend3,"upTrend3",BlacK); Else NoPlot(5); if direction3 > 0 Then Plot6(superTrend3,"downTrend3",GreeN); Else NoPlot(6); ### 수정할 부분이 있다면 3분 1분봉 용으로 사용하고싶습니다
프로필 이미지
매치다2
2023-08-22
965
글번호 171759
지표
답변완료

array

안녕하세요? StandardDevArray(arr,10,1);에서 - 괄호 우측 1은 무엇인가요? - 2, 3으로 변경해도 결과가 같습니다
프로필 이미지
코퍼
2023-08-22
1133
글번호 171758
시스템
답변완료

83425번 2항 문의사항 입니다.

83425번 2번항에 해당되는 파인스크립 을 예스 수식으로 변환 부탁드립니다 에서 변환해주신 수식 적용하니 지표가 트레이딩뷰차트랑 예스차트랑 다르게 표기 됩니다. 파일 첨부 하오니 검토 부탁 드리겠습니다. 아래: 파인스크립트 수식 83425번 2번항 atr_length = input(500) start = input(500) increment = input(500) maximum = input(500) entry_bars = input(500, title='Entry on Nth trend bar') atr = ta.atr(atr_length) atr := na(atr) ? ta.tr : atr psar = 0.0 // PSAR af = 0.0 // Acceleration Factor trend_dir = 0 // Current direction of PSAR ep = 0.0 // Extreme point trend_bars = 0 sar_long_to_short = trend_dir[1] == 1 and close <= psar[1] // PSAR switches from long to short sar_short_to_long = trend_dir[1] == -1 and close >= psar[1] // PSAR switches from short to long trend_change = barstate.isfirst[1] or sar_long_to_short or sar_short_to_long // Calculate trend direction trend_dir := barstate.isfirst[1] and close[1] > open[1] ? 1 : barstate.isfirst[1] and close[1] <= open[1] ? -1 : sar_long_to_short ? -1 : sar_short_to_long ? 1 : nz(trend_dir[1]) trend_bars := sar_long_to_short ? -1 : sar_short_to_long ? 1 : trend_dir == 1 ? nz(trend_bars[1]) + 1 : trend_dir == -1 ? nz(trend_bars[1]) - 1 : nz(trend_bars[1]) // Calculate Acceleration Factor af := trend_change ? start : trend_dir == 1 and high > ep[1] or trend_dir == -1 and low < ep[1] ? math.min(maximum, af[1] + increment) : af[1] // Calculate extreme point ep := trend_change and trend_dir == 1 ? high : trend_change and trend_dir == -1 ? low : trend_dir == 1 ? math.max(ep[1], high) : math.min(ep[1], low) // Calculate PSAR psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ? ep[1] : trend_dir == 1 ? psar[1] + af * atr : psar[1] - af * atr plot(psar, style=plot.style_cross, color=trend_dir == 1 ? color.green : color.red, linewidth=2) // Strategy strategy.entry('Long', strategy.long, when=trend_bars == entry_bars) strategy.entry('Short', strategy.short, when=trend_bars == -entry_bars) --------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------- 아래: 변환해주신 수식 입니다. 2-1 지표 input : atr_length(500),start(500),increment(500),maximum(500),entry_bars(500); var : atrv(0),psar(0),af(0),trend_dir(0),ep(0),trend_bars(0); var : sar_long_to_short(False),sar_short_to_long(False); var : trend_change(False); atrv = atr(atr_length); atrv = iff(IsNan(atrv) == true ,TrueRange , atrv); psar = 0.0; // PSAR af = 0.0; // Acceleration Factor trend_dir = 0; // Current direction of PSAR ep = 0.0; // Extreme point trend_bars = 0; sar_long_to_short = trend_dir[1] == 1 and close <= psar[1]; // PSAR switches from long to short sar_short_to_long = trend_dir[1] == -1 and close >= psar[1]; // PSAR switches from short to long trend_change = sar_long_to_short or sar_short_to_long; // Calculate trend direction trend_dir = iff(close[1] > open[1] , 1 , IFf(close[1] <= open[1] , -1 , IFf(sar_long_to_short , -1 , iff(sar_short_to_long , 1 , iff(isnan(trend_dir[1])==False,trend_dir[1],0))))); trend_bars = iff(sar_long_to_short , -1 , IFf(sar_short_to_long , 1 , iff(trend_dir == 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0)+ 1 , IFf( trend_dir == -1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) - 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) )))); // Calculate Acceleration Factor af = iff(trend_change , start , iff(trend_dir == 1 and high > ep[1] or trend_dir == -1 and low < ep[1] , min(maximum, af[1] + increment) , af[1])); // Calculate extreme point ep = iff(trend_change and trend_dir == 1 , high , iff(trend_change and trend_dir == -1 , low , iff(trend_dir == 1 , max(ep[1], high) , min(ep[1], low)))); // Calculate PSAR psar = iff(close[1] > open[1] , low[1] , IFf(close[1] <= open[1] , high[1] , IFf(trend_change , ep[1] , IFf(trend_dir == 1 , psar[1] + af * atrv , psar[1] - af * atrv)))); plot1(psar,"psar",iff(trend_dir == 1 , green , red)); 2-2 시스템 input : atr_length(500),start(500),increment(500),maximum(500),entry_bars(500); var : atrv(0),psar(0),af(0),trend_dir(0),ep(0),trend_bars(0); var : sar_long_to_short(False),sar_short_to_long(False); var : trend_change(False); atrv = atr(atr_length); atrv = iff(IsNan(atrv) == true ,TrueRange , atrv); psar = 0.0; // PSAR af = 0.0; // Acceleration Factor trend_dir = 0; // Current direction of PSAR ep = 0.0; // Extreme point trend_bars = 0; sar_long_to_short = trend_dir[1] == 1 and close <= psar[1]; // PSAR switches from long to short sar_short_to_long = trend_dir[1] == -1 and close >= psar[1]; // PSAR switches from short to long trend_change = sar_long_to_short or sar_short_to_long; // Calculate trend direction trend_dir = iff(close[1] > open[1] , 1 , IFf(close[1] <= open[1] , -1 , IFf(sar_long_to_short , -1 , iff(sar_short_to_long , 1 , iff(isnan(trend_dir[1])==False,trend_dir[1],0))))); trend_bars = iff(sar_long_to_short , -1 , IFf(sar_short_to_long , 1 , iff(trend_dir == 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0)+ 1 , IFf( trend_dir == -1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) - 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) )))); // Calculate Acceleration Factor af = iff(trend_change , start , iff(trend_dir == 1 and high > ep[1] or trend_dir == -1 and low < ep[1] , min(maximum, af[1] + increment) , af[1])); // Calculate extreme point ep = iff(trend_change and trend_dir == 1 , high , iff(trend_change and trend_dir == -1 , low , iff(trend_dir == 1 , max(ep[1], high) , min(ep[1], low)))); // Calculate PSAR psar = iff(close[1] > open[1] , low[1] , IFf(close[1] <= open[1] , high[1] , IFf(trend_change , ep[1] , IFf(trend_dir == 1 , psar[1] + af * atrv , psar[1] - af * atrv)))); IF trend_bars == entry_bars TheN Buy(); IF trend_bars == -entry_bars TheN Sell(); 2-3 종목검색 input : atr_length(500),start(500),increment(500),maximum(500),entry_bars(500); var : atrv(0),psar(0),af(0),trend_dir(0),ep(0),trend_bars(0); var : sar_long_to_short(False),sar_short_to_long(False); var : trend_change(False); atrv = atr(atr_length); atrv = iff(IsNan(atrv) == true ,TrueRange , atrv); psar = 0.0; // PSAR af = 0.0; // Acceleration Factor trend_dir = 0; // Current direction of PSAR ep = 0.0; // Extreme point trend_bars = 0; sar_long_to_short = trend_dir[1] == 1 and close <= psar[1]; // PSAR switches from long to short sar_short_to_long = trend_dir[1] == -1 and close >= psar[1]; // PSAR switches from short to long trend_change = sar_long_to_short or sar_short_to_long; // Calculate trend direction trend_dir = iff(close[1] > open[1] , 1 , IFf(close[1] <= open[1] , -1 , IFf(sar_long_to_short , -1 , iff(sar_short_to_long , 1 , iff(isnan(trend_dir[1])==False,trend_dir[1],0))))); trend_bars = iff(sar_long_to_short , -1 , IFf(sar_short_to_long , 1 , iff(trend_dir == 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0)+ 1 , IFf( trend_dir == -1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) - 1 , iff(isnan(trend_bars[1])==False,trend_bars[1],0) )))); // Calculate Acceleration Factor af = iff(trend_change , start , iff(trend_dir == 1 and high > ep[1] or trend_dir == -1 and low < ep[1] , min(maximum, af[1] + increment) , af[1])); // Calculate extreme point ep = iff(trend_change and trend_dir == 1 , high , iff(trend_change and trend_dir == -1 , low , iff(trend_dir == 1 , max(ep[1], high) , min(ep[1], low)))); // Calculate PSAR psar = iff(close[1] > open[1] , low[1] , IFf(close[1] <= open[1] , high[1] , IFf(trend_change , ep[1] , IFf(trend_dir == 1 , psar[1] + af * atrv , psar[1] - af * atrv)))); IF trend_bars == entry_bars TheN find(1); 즐거운 하루되세요
프로필 이미지
하루삼프로
2023-08-22
1621
글번호 171757
지표
답변완료

전략실행차트 멀티 사용법

안녕하세요. 현재 전략실행차트를 통해 시스템트레이딩을 잘 활용하고 있는데요, 혹시 여러개의 차트를 동시에 활용해서 시스템을 만들 수 있나요? 그리고 수식 작성 시, 당일의 고점, 저점을 dayhigh[1], daylow[1] 함수를 활용하고 있는데요, 최근 한시간 이내의 고점, 저점을 계산해주는 함수가 따로 있을까요? 확인부탁드립니다. 감사합니다.
프로필 이미지
루루르
2023-08-22
1254
글번호 171754
시스템
답변완료

스토캐스틱 지표값이 다르게 나옵니다.

input : 모드("현재"); Input : period1(5), period2(3); var : minv(0),maxv(0); #모드 현재 또는 미래일때 표시 if 모드 == "현재" or 모드 == "미래" Then { Plot2((c-Lowest(l,period1))/(Highest(h,period1)-Lowest(l,period1))*100,"%K",rgb(255, 102, 0)); Plot4(ma((c-Lowest(l,period1))/(Highest(h,period1)-Lowest(l,period1))*100,period2),"%D",rgb(141, 26, 130)); } 이렇게 공식으로 스토캐스틱 현재값을 구현했을 때 실제로 트렌즈차트에 적용되어 있는 스토캐스틱과 비교했을 때 값이 다르게 나올 경우, 어떤 문제가 있다고 보시는지요? 식의 문제인건지..아니면 스토캐스틱을 구하는 다른 방식이 있는 것인지 궁금합니다. 트렌즈차트에 적용된 지표와 제가 만든 지표 사이의 괴리가 발생하는 이유를 알 수 있을까요?
프로필 이미지
이웃집고양이
2023-08-22
1197
글번호 171753
지표
답변완료

수식 문의

안녕하세요 .. 키움 신호 수식인데.. 예스 종목검색 수식으로 부탁드려요 A=MACD(5,10)-eavg(MACD(5,10),15); B=MACD(10,40)-eavg(MACD(10,40),80); CrossUp(A, B)
프로필 이미지
위피데이
2023-08-22
1026
글번호 171738
종목검색