커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

조건검색 문의

// Pine Script Code for Orange Breakout Signal Only// Copy and paste this entire code into TradingView Pine Editor//@version=5indicator("Orange Breakout Signal Only", overlay=true)// Input parametersperiod2 = input.int(20, "Period 2", minval=1)multiplier2 = input.float(2.0, "Multiplier 2", minval=0.1)// Calculate sourcesrc = (high + low) / 2// Function to calculate SuperTrendsuperTrend(period, multiplier) => alpha = 1.0 / period source = math.max(high - low, math.max(math.abs(high - close[1]), math.abs(low - close[1]))) atr = 0.0 atr := alpha * source + (1 - alpha) * nz(atr[1]) upperBand = src + multiplier * atr lowerBand = src - multiplier * atr prevLowerBand = nz(lowerBand[1]) prevUpperBand = nz(upperBand[1]) lowerBand := lowerBand > prevLowerBand or close[1] < prevLowerBand ? lowerBand : prevLowerBand upperBand := upperBand < prevUpperBand or close[1] > prevUpperBand ? upperBand : prevUpperBand direction = 0 direction := close > upperBand ? 1 : close < lowerBand ? -1 : nz(direction[1], 0) superTrendValue = direction == 1 ? lowerBand : upperBand [superTrendValue, direction]// Calculate SuperTrend[supertrend2, direction2] = superTrend(period2, multiplier2)// 오렌지 라인 돌파 신호만 감지 및 표시if ta.crossover(close, supertrend2) // 돌파 신호만 표시 (라인 없이) label.new(bar_index, low, "▲ ORANGE\nBREAKOUT", color=color.orange, textcolor=color.white, style=label.style_label_up, yloc=yloc.belowbar)오랜만에 문의 글 올립니다 (__) 일봉상 위 신호가 발생한 종목에 대해서 검출할 수 있도록 검색식 만들어주시면 감사드리겠습니다 :)
supertrend돌파
프로필 이미지
사공하늘
2025-10-19
96
글번호 227017
검색
답변완료

참고데이타

Input : shortPeriod(12), longPeriod(26), Period(9);Var : MACDv(0), MACDsig(0),macdosc(0) ;MACDv = MACD(shortPeriod, longPeriod);MACDsig = ema(MACDv,Period);macdosc = MACDv-ema(MACDv,Period);if macdosc > 0 then{ plot1(macdosc, "MACDOscillator+"); Plot2(0, "MACDOscillator-");}else{ Plot1(0, "MACDOscillator+"); Plot2(macdosc, "MACDOscillator-");}Plot3(MACDv, "MACD");Plot4(MACDsig, "MACDSignal"); PlotBaseLine1(0, "기준선1");참고데디타 2로 적용하게 만들어 주세요
프로필 이미지
노블레스
2025-10-19
84
글번호 227015
지표
답변완료

문의드립니다.

안녕하세요. 특정 시간대 시가,고가,저가,종가 데이터 추출하는 방법이 있나요?예를 들어서 설명드리면 한국 시간 기준 미국 선물 시장은 07:00부터 자정을 넘어 다음날 06:00까지 열리지 않습니까?23년 4월 17일 07:00(선물 시장 개장)부터 22:30(미국 본장 전)까지의 시가,고가,저가,종가를 추출하고, 22:30(미국 본장 시작)부터 06:00(선물 시장 마감)까지의 시가,고가,저가,종가 데이터를 추출하고 싶을 때 어떤 수식을 이용해서 추출하면 될까요?
데이터추출 Print
프로필 이미지
slowfast
2025-10-19
90
글번호 227014
사용자 함수
답변완료

문의드립니다

안녕하세요?1.아래수식이 콤파일이 안되는데 도와주세요Input : Period(20);Input : 상승색1(Pink), 상승색2(Magenta), 상승색3(Red);Input : 하락색1(LightBlue), 하락색2(Cyan), 하락색3(Blue);Var : DParity(0), clr(0);Var : AlertFlag_101(False), AlertFlag_99(False);Var : txtID101(0), txtID99(0);//--------------------------------------// 이격도 계산//--------------------------------------DParity = Disparity(Period);//--------------------------------------// 색상 지정//--------------------------------------If DParity >= 100 and DParity < 100.5 Then clr = 상승색1;Else If DParity >= 100.5 and DParity < 101 Then clr = 상승색2;Else If DParity >= 101 Then clr = 상승색3;Else If DParity < 100 and DParity > 99.5 Then clr = 하락색1;Else If DParity <= 99.5 and DParity > 99 Then clr = 하락색2;Else clr = 하락색3;//--------------------------------------// 기준선 표시//--------------------------------------Plot1(DParity, "이격도", clr);PlotBaseLine1(101.0, "101.0");PlotBaseLine2(100.5, "100.5");PlotBaseLine3(100.0, "기준선");PlotBaseLine4(99.5, "99.5");PlotBaseLine5(99.0, "99.0");//--------------------------------------// 알림 + 시각 표시 (핸들 저장 방식)//--------------------------------------// 101 상향 돌파If DParity >= 101 and AlertFlag_101 = False Then Begin PlaySound("C:\WRFutures\YesGlobalPro\data\Sound\이격도 101 상방돌파.wav"); Alert("이격도 101선 상향 돌파!"); txtID101 = Text_New_Self(Date, Time, DParity + 0.3, "▲101돌파"); Text_SetColor(txtID101, 상승색3); AlertFlag_101 = True;EndElse If DParity < 101 Then AlertFlag_101 = False;// 99 하향 돌파If DParity <= 99 and AlertFlag_99 = False Then Begin PlaySound("C:\WRFutures\YesGlobalPro\data\Sound\이격도 99 하방돌파.wav"); Alert("이격도 99선 하향 돌파!"); txtID99 = Text_New_Self(Date, Time, DParity - 0.3, "▼99이탈"); Text_SetColor(txtID99, 하락색3); AlertFlag_99 = True;EndElse If DParity > 99 Then AlertFlag_99 = False;2.아래수식은 콤파일은 되는데 아무신호도 발생하지않습니다(기간충분히 주었는데도)Input : fractalPeriods(2);Vars : disp20(0);// 20일 이격도 계산disp20 = Close / Average(Close, 20) * 100;// ------------------------// 매수 조건// ------------------------If disp20 < 90 ThenBegin If SwingLow(1, Low, fractalPeriods, fractalPeriods, fractalPeriods*2+1) <> -1 Then Buy ("FractalBuy");End;// ------------------------// 매도 조건// ------------------------If disp20 > 110 ThenBegin If SwingHigh(1, High, fractalPeriods, fractalPeriods, fractalPeriods*2+1) <> -1 Then Sell ("FractalSell");End;감사합니다
프로필 이미지
새벽에
2025-10-19
164
글번호 227012
지표
답변완료

문의드립니다.

선물매매 청산식으로진입봉이 30틱이상 양봉에서 매수신호 발생 후 5봉이내에 30틱이상 꺼꾸로 하락하면 청산. 이때 종가가 아닌 30틱 반락한 위치에서 바로 청산진입봉이 30틱이상 음봉에서 매도신호 발생 후 5봉이내에 30틱이상 꺼꾸로 상승하면 청산. 이때 종가가 아닌 30틱 반등한 위치에서 바로 청산노고에 미리 감사드립니다~
프로필 이미지
카르마다
2025-10-18
90
글번호 227010
시스템

존슨비치 님에 의해서 삭제되었습니다.

프로필 이미지
존슨비치
2025-10-18
76
글번호 227009
종목검색
답변완료

검색식과 종목검색식 부탁 드립니다1

아래 지표(ETwoPole)에서 검색식과 종목검색식 부탁 드립니다조건은 아래와 같습니다- 해당 지표의 색상이 청색에서 적색으로 변하는 지점 첨부 그림 참조Inputs: ETO_Period(21), // E Two Pole 기간 VDI_Period(21), // VDI 기간 VDI_Smoothing(3); // VDI 부드럽게 할 기간Vars: FirstEMA(0), SecondEMA(0), ETO(0);// PriceChange(0), AvgVolume(0), VolRatio(0),// UpVDI(0), DownVDI(0), VDI(0);// ===== 1. E Two Pole Oscillator 계산 =====// 1단계 EMAFirstEMA = EMA(Close, ETO_Period);// 2단계 EMASecondEMA = EMA(FirstEMA, ETO_Period);// 이 투폴 오실레이터ETO = Close - SecondEMA;/*// ===== 2. VDI 계산 =====// 가격 변화PriceChange = Close - Close[1];// 평균 거래량AvgVolume = Average(Volume, VDI_Period);// 거래량 비율If AvgVolume > 0 then VolRatio = Volume / AvgVolume;Else VolRatio = 1;// VDI 상승/하락 누적If PriceChange > 0 and VolRatio > 1 then UpVDI = UpVDI + (PriceChange * VolRatio);ElseIf PriceChange < 0 and VolRatio > 1 then DownVDI = DownVDI + (AbsValue(PriceChange) * VolRatio);// VDI 지표 계산VDI = EMA(UpVDI - DownVDI, VDI_Smoothing);*/Plot1(ETO,"ETO",IFF(ETO > 0,IFF(CountIF(ETO < 0, 3) > 0 && ETO > 0 && ETO >ETO[1],RgB(190,0,0), Red),Blue),Def,IFF(CountIF(ETO < 0, 3) > 0 && ETO > 0 && ETO >ETO[1],10,IFF(ETO >ETO[1],3,1)));Var : ETwoPole(0);_2025_WoodStock_ETwoPole(15,15,3, ETwoPole);Plot2( ETwoPole,"ETwoPole");/*Plot2(VDI,"VDI");Plot3(ema(VDI,20),"VDI20");// ===== 3. 매수·매도 조건 =====/*Condition1 = (ETO crosses above 0) and (VDI > 0); // 매수조건Condition2 = (ETO crosses below 0) and (VDI < 0); // 매도조건
ETwoPole
프로필 이미지
행복만땅
2025-10-18
129
글번호 227008
종목검색
답변완료

검색식과 종목검색식 부탁 드립니다

아래 지표(RSI DIVERGENCE)에서 검색식과 종목검색식 부탁 드립니다조건은 아래와 같습니다 1. 해당 지표의 색상이 적색에서 라임으로 변하며 2. 해당값이 0보다 클때 입니다. 부탁드립니다.input : len_fast(5),len_slow(14);var : src_fast(0),src_slow(0);var : alpha_fast(0),up_fast(0),down_fast(0),rsi_fast(0);var : alpha_slow(0),up_Slow(0),down_slow(0),rsi_slow(0);var : divergence(0);src_fast = C;var1 = max(src_fast-src_fast[1],0);Var2 = -min(src_fast-src_fast[1],0);src_slow = C;var3 = max(src_slow-src_slow[1],0);Var4 = -min(src_slow-src_slow[1],0);alpha_fast = 1/len_fast;up_fast = 0;up_fast = IFf(IsNan(up_fast[1])== true, ma(var1,len_fast),alpha_fast*var1+(1 - alpha_fast)*up_fast[1]);down_fast = 0;down_fast = IFf(IsNan(down_fast[1])== true, ma(var2,len_fast),alpha_fast*var2+(1 - alpha_fast)*down_fast[1]);rsi_fast = iff(down_fast == 0 , 100 , IFf( up_fast == 0 , 0 , 100 - (100 / (1 + up_fast / down_fast))));alpha_slow = 1/len_slow;up_slow = 0;up_slow = IFf(IsNan(up_slow[1])== true, ma(Var3,len_slow),alpha_slow*Var3+(1 - alpha_slow)*up_slow[1]);down_slow = 0;down_slow = IFf(IsNan(down_slow[1])== true, ma(Var4,len_slow),alpha_slow*Var4+(1 - alpha_slow)*down_slow[1]);rsi_slow = iff(down_slow == 0 , 100 , iff(up_slow == 0 , 0 , 100 - (100 / (1 + up_slow / down_slow))));divergence = rsi_fast - rsi_slow;plot1(divergence, "divergence",iff(divergence > 0 , lime,red));PlotBaseLine1(0);
RSI DIVERGENCE RSI다이버젼스
프로필 이미지
행복만땅
2025-10-18
95
글번호 227007
종목검색
답변완료

검색식 부탁드립니다.

노고에 항상 고맙고 감사합니다.1.2번 조합해서 수식어가 필요하구요.2 번만 별도수식어가 필요합니다.즐거운 하루 되세요.1)var : 기준선(0),mav1(0),mav2(0),mav3(0);기준선 = (highest(H,26)+lowest(L,26))/2;mav1 = ma(C,5);mav2 = ma(C,10);mav3 = ma(C,20);if Money >= 50000000000 and C >= C[1]*1.10 and C > highest(H,20)[1] and C > 기준선 and mav1 > mav2 and mav2 > mav3 Then Find(1);----------------------------------2)A=supertrend(12,3);A1=supertrend(11,2);A2=supertrend(10,1);B=(highest(high,9)+lowest(low,9)+highest(high,26)+lowest(low,26))/4;B1=(highest(high,52)+lowest(low,52))/2;B2=AVG(C,200);A<C && A1<C && A2<C && CROSSUP(C,MAX(B(25),B1(25),B2))
supertrend
프로필 이미지
치치야
2025-10-18
125
글번호 227006
종목검색
답변완료

문의 드립니다

직전포지션에서 손실이 20이 났는데 현재 진입 포지션에서 수익이 20이상 나고 있는데 만약 수익이 20이하의 몇프로 떨어지면 청산하는 수식 부탁드립니다.
PositionProfit(1)
프로필 이미지
lacl
2025-10-18
83
글번호 227004
시스템