커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 문의 드립니다

안녕하십니까?수식 부탁 드립니다.매수: 20이평선에 대한 이격도 105 통과후 0.5% 상향시 즉시 매수매도: 20 이평선에 대한 이격도 105 하향후 0.5% 하향시 즉시 매도
프로필 이미지
기관장
2025-11-01
87
글번호 227559
종목검색
답변완료

부탁드립니다

수고하십니다아래수식을 오류 없게 수정부탁드립니다Input: Period(14);Input: adx_width1(2), adx_width2(4), adx_width3(7);Input: plus_gold_width(3), plus_dead_width(1);Input: minus_dead_width(3), minus_gold_width(1);Input: price_offset(0.5);Var: ADXv(0), DP(0), DM(0);Var: adx_line_width(0), plus_line_width(0), minus_line_width(0);Var: text_color(0), display_price(0);//Calculate ADX valuesADXv = ADX(Period);DP = DiPlus(Period);DM = DiMinus(Period);//Determine ADX line width based on ADX levelIf ADXv >= 20 and ADXv <= 50 Then adx_line_width = adx_width2Else If ADXv < 20 Then adx_line_width = adx_width1Else adx_line_width = adx_width3;//Determine +DI line widthIf DP > DM Then plus_line_width = plus_gold_widthElse plus_line_width = plus_dead_width;//Determine -DI line widthIf DP < DM Then minus_line_width = minus_dead_widthElse minus_line_width = minus_gold_width;//Plot indicator linesPlot1(ADXv, "ADX", Def, Def, adx_line_width);Plot2(DP, "+DI", Def, Def, plus_line_width);Plot3(DM, "-DI", Def, Def, minus_line_width);//Display price with ADX strength and DI conditiondisplay_price = High + price_offset;If ADXv >= 20 and ADXv <= 50 Then Begin If DP > DM Then Begin text_color = RGB(0, 255, 255); //Cyan DrawText("ADX:" + NumToStr(ADXv, 2) + " +DI>-DI", display_price, text_color); End Else Begin text_color = RGB(255, 255, 0); //Yellow DrawText("ADX:" + NumToStr(ADXv, 2) + " +DI<-DI", display_price, text_color); End;EndElse If ADXv < 20 Then Begin text_color = RGB(128, 128, 128); //Gray DrawText("ADX:" + NumToStr(ADXv, 2) + " Weak", display_price, text_color);EndElse Begin If DP > DM Then Begin text_color = RGB(255, 165, 0); //Orange DrawText("ADX:" + NumToStr(ADXv, 2) + " Strong +DI", display_price, text_color); End Else Begin text_color = RGB(255, 0, 0); //Red DrawText("ADX:" + NumToStr(ADXv, 2) + " Strong -DI", display_price, text_color); End;End;
프로필 이미지
파생돌이
2025-11-01
75
글번호 227558
지표
답변완료

보조지표 분봉 거래량에서 매도량 매수량 구분표시

아래 사진처럼 매수량과 매도량을 전체 거래량 비율로 나타나게 할 수 있는 것 같은데 스스로 잘 모르겠습니다.아래처럼 매도량이 아래에 있고 매수량이 그 위에 있게 부탁립니다.혹시 참고가 되실 것 같아 다른 프로그램의 코드를 복사해서 붙여 놓았습니다.//////////////////////////////////////////////////////////////////////////////////////////////////////////////////Buy/Sell volumetotalamp = (high-low)/low*100a = close > open ? ((open-low)/low*100)+((high-close)/close*100) : ((close-low)/low*100)+((high-open)/open*100)b = a*1/totalamp/2volBuy = close > open ? volume*b + (volume-(volume*b*2)) : volume*bvolSell = close < open ? volume*b + (volume-(volume*b*2)) : volume*bptotal = plot(totalVol ? volBuy + volSell : na, title="Total Volume", style=plot.style_columns, color=close > open ? color.new(#0ecb81, 50) : color.new(#f6465d, 50))pbuy = plot(volBuy, title="Buy Volume", style=plot.style_columns, color=color.new(#0ecb81, 0))psell = plot(volSell * -1, title="Sell Volume", style=plot.style_columns, color=color.new(#f6465d, 0))hline(0, linestyle=hline.style_dotted, color=#181c27, editable=false)
프로필 이미지
jr동원이
2025-10-31
97
글번호 227557
지표
답변완료

수식 부탁합니다

아래 키움수식 예스트레이더 검색식 부탁합니다.대금=(H+O+L+C)/4*V/100000000; A=IF(C>O,대금,0); B=SUM(A); D=ValueWhen(1,Date(1)!=Date,B(1)); 양대금=B-D; A1=IF(C<O,대금,0); B1=SUM(A1); D1=ValueWhen(1,Date(1)!=Date,B1(1)); 음대금=B1-D1; CROSSUP(양대금,음대금)
프로필 이미지
미래테크
2025-10-31
113
글번호 227552
종목검색
답변완료

부탁드립니다

1봉전 1000원이상 검색식 부탁 드립니다
프로필 이미지
님이랑
2025-10-31
96
글번호 227551
종목검색
답변완료

질문 있습니다.

감사합니다.궁금한게 있는데요.저는 당일 시스템 매매를 하고 있거든요그러니까 궁금한게요.화요일에 매수 진입해서 그 포지션을 오바해서 수요일까지 들고 가는 상황에서예스스탁 프로그램은 매일 아침에 로긴을 해줘야 하잖아요?만약에 수요일 하루종일 예스스탁 프로그램을 로긴 하지 못하고 놔두면 수요일에 매매 조건을 만났데도 로긴이 안되니 조건 청산 안되는거죠?항상 프로그램을 로긴하면서 조건 진행하는 상태로 놔둬야 하는건가요??
프로필 이미지
스오어스
2025-10-31
88
글번호 227549
시스템
답변완료

문의

데이트레이딩084500부터 154500까지 거래아래 수식은 거래횟수 20회까지 허용, 누적패수 3회면 거래중지 수식입니다.연속으로 2패할 경우, "거래횟수" 20회를 3회로 변동하는 수식을 요청드립니다.어제 요청드리고 답변 받은 내용은거래횟수 20회까지 허용, 누적패수 5회면 거래중지 수식이었고 연속으로 3패할 경우 , "누적패수" 5회를 4회로 조정하는 수식을 요청드린 바 있습니다. 위 내용은 "거래횟수" 조정입니다. 어제 것과 다르므로 참고하시라고 적었습니다.항상 고맙습니다.************************************************************************************************************************************************input : 진입시간(084700),진입제한시간(125000);input : 거래횟수(20),누적패수(3);input : b1(54),진입눌림1(6),진입돌파1(4);input : b2(142),진입눌림2(6),진입돌파2(4);input : als(42),atr1(0),atr2(112);input : bls(70),btr1(0),btr2(132);var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0);var : Tcond(false);Var : loss(0); if bdate != bdate[1] Then loss = 0; if TotalTrades > TotalTrades[1] and PositionProfit(1) < 0 Then loss = loss+1; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; HH = H; } if stime >= 진입시간 then{ if H > HH Then HH = H; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C <= HH-PriceScale*B1 Then{ E1 = 1; L1 = L; i1 = index; V1 = HH; //시작점 종가 } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; #고가가 시작봉종가보다 작을 때만 눌림체크 if H <= V1 and H >= L1+PriceScale*진입눌림1 Then{ E1 = 2; i1 = index; S1 = L1; } } //시작점 종가보다 높은 가격이 발생하면 초기화 if E1 >= 1 and H > V1 Then{ E1 = 0; HH = H; } if loss < 누적패수 and E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파1 and Tcond == true Then{ sell("s1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; HH = H; } if H > HH Then HH = H; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C <= HH-PriceScale*B2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림2 Then{ E1 = 2; i1 = index; S1 = L1; } } if loss < 누적패수 and E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파2 and Tcond == true Then{ sell("s2"); E1 = 0; } }} if MarketPosition== -1 Then{ if IsEntryName("s1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); } Else if IsEntryName("s2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); } Else { SetStopLoss(0); SetStopTrailing(0,0); }}
프로필 이미지
목마와숙녀
2025-10-31
95
글번호 227548
시스템
답변완료

227515 재문의

안녕하세요?"data2이면 data2(dayatr(10))와 같이 작성해 사용하시면 됩니다. "라고 답변을 주셨는데, 저는 예컨대, var1 = data2(C) + data3(C) - 3*data4(C);var2 = dayatr(var1, period);등으로 사용할 예정이라서, dayatr 함수의 인풋에input: CC(Numeric), per(Numeric)등으로 인풋값이 하나 더 있는 함수를 원합니다.감사합니다.
프로필 이미지
에구머니
2025-10-31
79
글번호 227541
사용자 함수
답변완료

문의 드립니다.

안녕하세요항상 도움을 주셔서 감사합니다.아래의 서식에서 추가 조건을 부탁드립니다.*추가조건-단순이동평균 200일선(INPUT) 위에 가격이 있을시 매수 만 진입, 아래에 있을 시 매도 만 진입 (매수 진입 x) **최적화를 위해 INPUT에 넣어주세요Input : shortPeriod(5), longPeriod(23), Period(13);input : 손절(350);value1 = MACD(shortPeriod, longPeriod);value2 = ema(value1, Period);# 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); }# 매도/매수청산If CrossDown(value1, value2) Then { Sell(); }SetStopLoss(손절,PointStop);
프로필 이미지
가자아이
2025-10-31
72
글번호 227534
시스템
답변완료

아래의 식을 예스 랭귀지로 변환 좀 부탁드립니다.

✅ 현실형 추세추종 + ADX + 변동성 필터 전략 (예스랭귀지)# ========================================================== # 📊 현실형 나스닥 60분봉 자동매매 전략 # - 추세장만 진입 (ADX 필터) # - 저변동 횡보장 회피 (이평 간격 필터) # - 익절/손절 구간 현실 조정 (당일 평균폭 기준) # ========================================================== input : maShort(20), maLong(60), adxPeriod(14); input : adxThreshold(25), maGapLimit(0.5); input : StopLossP(150), TakeProfitP(280); # ✅ 현실적 익절·손절 설정 (150~300p) input : tradeSize(1); var : adxVal(0), maS(0), maL(0), maGap(0); var : buyCond(False), sellCond(False), trend(0); # ---- 지표 계산 ---- maS = Average(Close, maShort); maL = Average(Close, maLong); adxVal = ADX(adxPeriod); maGap = Abs(maS - maL) / maL * 100; # ---- 추세 판단 ---- if maS > maL then trend = 1; if maS < maL then trend = -1; # ---- 매수 조건 ---- if trend = 1 and adxVal > adxThreshold and maGap > maGapLimit and Close > maS then buyCond = True; else buyCond = False; # ---- 매도 조건 ---- if trend = -1 and adxVal > adxThreshold and maGap > maGapLimit and Close < maS then sellCond = True; else sellCond = False; # ---- 진입 로직 ---- if MarketPosition = 0 and buyCond then Buy("L-Entry") next bar at market; if MarketPosition = 0 and sellCond then SellShort("S-Entry") next bar at market; # ---- 청산 조건 ---- SetStopLoss(StopLossP); SetProfitTarget(TakeProfitP); # ---- 추가조건: 반전 시 즉시 청산 ---- if MarketPosition = 1 and trend = -1 then ExitLong("TrendRevL") next bar at market; if MarketPosition = -1 and trend = 1 then ExitShort("TrendRevS") next bar at market; 📈 이 설정의 핵심 포인트항목값설명익절 목표280p하루 변동폭 평균의 70~80% 수준손절폭150p1:2 손익비 유지ADX 필터25 이상만 거래횡보장 거래 회피이평간격 제한0.5 이상단기/장기 이평이 붙어있으면 진입X추세 반전 시 강제 청산있음속임수 반전(역배열 돌파 등) 차단
프로필 이미지
산수유
2025-10-31
126
글번호 227531
시스템