커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 수정 및 작성 요청

너무 자주 부탁드려서 죄송합니다. 아래는 만들어주신 윌리엄 엘리게이터 n봉 정배열 전환 수식입니다. 현재는 당일 기준 정배열 전환수식인데요 첨부사진처럼 당일 기준이 아닌 3 5 8 옵셋된 선이 정배열로 바뀌는걸로 수정좀 부탁드리겠습니다. 늘 도움 주셔서 감사드립니다 꾸벅~ input : jawPeriod(13),jawOffset(8); input : teethPeriod(8),teethOffset(5); input : lipsPeriod(5),lipsOffset(3); var : hl2(0),jaw(0),teeth(0),lips(0); hl2 = (h+l)/2; jaw = 0; if IsNaN(jaw[1]) == true Then jaw = ma(hl2,jawPeriod); Else jaw = (jaw[1]*(jawPeriod-1) + hl2)/jawPeriod; teeth = 0; if IsNaN(teeth[1]) == true Then teeth = ma(hl2,teethPeriod); Else teeth = (teeth[1]*(teethPeriod-1) + hl2)/teethPeriod; lips = 0; if IsNaN(lips[1]) == true Then lips = ma(hl2,lipsPeriod); Else lips = (lips[1]*(lipsPeriod-1) + hl2)/lipsPeriod; if C > lips[lipsOffset] and lips[lipsOffset] > teeth[teethOffset] and teeth[teethOffset] > jaw[jawOffset] Then Find(1); 2.[조건검색식 및 지표] 아래는 ADR% - Average Daily Range 지표 스크립트 입니다. 지표 및 특정값이상(ex 4) 조건검색식 부탁드립니다. study(title="ADR% - Average Daily Range %", overlay=false) Length = input(20, title="length") dhigh = security(syminfo.tickerid, 'D', high) dlow = security(syminfo.tickerid, 'D', low) // formula amended, thanks to GlinckEastwoot ADR = 100 * (sma(dhigh/dlow, Length) - 1) plot(ADR, color=color.orange,title="ADR",linewidth=1) 3.[종목검색식] 조건. 10일(지수) 이동평균선이 윌리엄 엘리게이터 입술을 골든크로스 항상 도움주셔서 감사드리고 매사 좋은일만 있으시길 바랍니다. ^^
프로필 이미지
신데렐라맨
2023-03-26
1664
글번호 167510
종목검색
답변완료

MACD 지표에서

안녕하세요 보조지표로 MACD를사용하는데 빨간선이 바란선을 크로스할때 화살표로 매수 매도 표시가 되게 해주세요 거기다 크로스 될때 매수 매도소리도 나오면 좋겠읍니다 꼭좀부탇드립니다~ 감사합니다~^^
프로필 이미지
bdew
2023-03-24
1114
글번호 167505
지표
답변완료

전환 쌍바닥

Input : 전환(0.2),쌍바닥상(1),쌍바닥하(2),쌍봉상(1),쌍봉하(2); Var:j(0),jj(0),HH(0),LL(0),hiBar(0),loBar(0),최종꼭지점(""),처리구분(""), TL1(0),TX1(0); Array:고[10,4](0),저[10,4](0); var : box(0),BB(False); var : TX11(0),TX12(0),TX13(0); var : cond11(False),cond12(False),cond13(False); HH = H; LL = L; If Index == 0 Then { 고[1,1] = HH; 고[1,2] = 0; 고[1,3] = sDate; 고[1,4] = sTime; 저[1,1] = LL; 저[1,2] = 0; 저[1,3] = sDate; 저[1,4] = sTime; } If Index > 0 Then { hiBar = hiBar + 1; loBar = loBar + 1; } If HH[hiBar] < HH Then hiBar = 0; If LL[loBar] > LL Then loBar = 0; Condition1 = 저[1,1]+전환 <= HH and hiBar == 0; Condition2 = 고[1,1]-전환 >= LL and loBar == 0; 처리구분 = ""; If Condition1 and Condition2 Then { If 최종꼭지점 == "저점" Then { If 저[1,1] > LL Then 처리구분 = "저점처리"; Else 처리구분 = "고점처리"; } Else If 최종꼭지점 == "고점" Then { If 고[1,1] < HH Then 처리구분 = "고점처리"; Else 처리구분 = "저점처리"; } } Else If Condition1 Then 처리구분 = "고점처리"; Else If Condition2 Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { If 최종꼭지점 == "저점" Then { //양전환되면 tx11점은 삭제 Text_Delete(tx11); For j = 10 DownTo 2 { For jj = 1 To 4 { 고[j,jj] = 고[j-1,jj]; } } 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; TL1 = TL_New_Self(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]); TL_SetSize(TL1,2); TL_SetColor(TL1,RED); Text_Delete(tx1); TX1 = Text_New_Self(고[1,3],고[1,4],고[1,1],NumToStr(고[1,1]-저[1,1],2)); Text_SetSize(tx1,25); Text_SetColor(Tx1,Red); Text_SetStyle(tx1,1,1); Text_SetBold(tx1,1); cond13 = False; if 고[1,1] <= 고[2,1]+PriceScale*쌍봉상 and 고[1,1] >= 고[2,1]-PriceScale*쌍봉하 and 고[2,1] > 0 Then { cond13 = true; tx13 = Text_New(고[1,3],고[1,4],고[1,1],"●"); Text_SetStyle(tx13,2,0); Text_SetColor(tx13,Magenta); Text_SetSize(tx13,20); } } Else If 고[1,1] < HH[hiBar] Then { 고[1,1] = HH[hiBar]; 고[1,2] = Index - hiBar; 고[1,3] = sDate[hiBar]; 고[1,4] = sTime[hiBar]; hiBar = -1; loBar = -1; TL_SetEnd(TL1,고[1,3],고[1,4],고[1,1]); Text_SetString(TX1,NumToStr(고[1,1]-저[1,1],2)); Text_SetLocation(TX1,고[1,3],고[1,4],고[1,1]); if cond13 == False Then { if 고[1,1] <= 고[2,1]+PriceScale*쌍봉상 and 고[1,1] >= 고[2,1]-PriceScale*쌍봉하 and 고[2,1] > 0 Then { cond13 = true; tx13 = Text_New (고[1,3],고[1,4],고[1,1],"●"); Text_SetStyle(tx12,2,0); Text_SetColor(tx12,Magenta); Text_SetSize(tx12,20); } } Else { if 고[1,1] <= 고[2,1]+PriceScale*쌍봉상 and 고[1,1] >= 고[2,1]-PriceScale*쌍봉하 and 고[2,1] > 0 Then { Text_SetLocation(tx11,고[1,3],고[1,4],고[1,1]); } Else { Text_Delete(tx12); cond12 = False; } } } 최종꼭지점 = "고점"; Plot1(고[1,1]); NoPlot(2); } If 처리구분 == "저점처리" Then { If 최종꼭지점 == "고점" Then { For j = 10 DownTo 2 { For jj = 1 To 4 { 저[j,jj] = 저[j-1,jj]; } } 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; TL1 = TL_New_Self(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); TL_SetSize(TL1,2); TL_SetColor(TL1,BLUE); Text_Delete(tx1); TX1 = Text_New_Self(저[1,3],저[1,4],저[1,1],NumToStr(저[1,1]-고[1,1],2)); Text_SetSize(tx1,25); Text_SetColor(Tx1,Blue); Text_SetStyle(tx1,1,0); Text_SetBold(tx1,1); bb = False; if bb == False and 저[1,1] <= 고[1,1]-0.5 and 고[1,1] > 0 Then { bb= true; box = Box_New_Self(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); Box_SetColor(box,Lime); Box_SetFill(box,true,70); } cond11 = False; if 저[1,1] >= 저[2,1]-PriceScale*2 and 저[2,1] > 0 Then { cond11 = true; tx11 = Text_New(저[1,3],저[1,4],저[1,1],"●"); Text_SetStyle(tx11,2,0); Text_SetColor(tx11,Blue); Text_SetSize(tx11,30); } cond12 = False; if 저[1,1] < DayHigh-0.7 and 저[1,1] <= 저[2,1]+PriceScale*쌍바닥상 and 저[1,1] >= 저[2,1]-PriceScale*쌍바닥하 and 저[2,1] > 0 Then { cond12 = true; tx12 = Text_New(저[1,3],저[1,4],저[1,1],"●"); Text_SetStyle(tx12,2,0); Text_SetColor(tx12,Green); Text_SetSize(tx12,20); } } Else If 저[1,1] > LL[loBar] Then { 저[1,1] = LL[loBar]; 저[1,2] = Index - loBar; 저[1,3] = sDate[loBar]; 저[1,4] = sTime[loBar]; hiBar = -1; loBar = -1; TL_SetEnd(TL1,저[1,3],저[1,4],저[1,1]); Text_SetString(TX1,NumToStr(저[1,1]-고[1,1],2)); Text_SetLocation(TX1,저[1,3],저[1,4],저[1,1]); if bb == true Then Box_SetEnd(box,저[1,3],저[1,4],저[1,1]); Else { if bb == False and 저[1,1] <= 고[1,1]-0.5 and 고[1,1] > 0 Then { bb= true; box = Box_New_Self(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]); Box_SetColor(box,Lime); Box_SetFill(box,true,70); } } if cond11 == true Then { if 저[1,1] >= 저[2,1]-PriceScale*2 and 저[2,1] > 0 Then Text_SetLocation(tx11,저[1,3],저[1,4],저[1,1]); if 저[1,1] < 저[2,1]-PriceScale*2 and 저[2,1] > 0 Then { Text_Delete(tx11); cond11 = False; } } if cond12 == False Then { if 저[1,1] < DayHigh-0.7 and 저[1,1] <= 저[2,1]+PriceScale*쌍바닥상 and 저[1,1] >= 저[2,1]-PriceScale*쌍바닥하 and 저[2,1] > 0 Then { cond12 = true; tx12 = Text_New(저[1,3],저[1,4],저[1,1],"●"); Text_SetStyle(tx12,2,0); Text_SetColor(tx12,Green); Text_SetSize(tx12,20); } } Else { if 저[1,1] < DayHigh-0.7 and 저[1,1] <= 저[2,1]+PriceScale*쌍바닥상 and 저[1,1] >= 저[2,1]-PriceScale*쌍바닥하 and 저[2,1] > 0 Then { Text_SetLocation(tx11,저[1,3],저[1,4],저[1,1]); } Else { Text_Delete(tx12); cond12 = False; } } } 최종꼭지점 = "저점"; Plot2(저[1,1]); NoPlot(1); } 81350 재문의 쌍바닥 쌍봉 수식에 오류가 많이 납니다. 검토 부탁드립니다.
프로필 이미지
고성
2023-03-24
1398
글번호 167502
지표
답변완료

수고하십니다.

안녕하세요.. 만약 F4 검증이 랭귀지나 스팟에서 조절할 수 없다면 1시간마다 자동 F4 검증을 할 수 는 업나요. 방법을 알려주시면 감사하겠습니다.
프로필 이미지
구름달
2023-03-24
1354
글번호 167501
사용자 함수

아트정 님에 의해서 삭제되었습니다.

프로필 이미지
아트정
2023-03-24
7
글번호 167495
시스템
답변완료

진입한 다음봉에 청산

감사합니다. 1 이평5가 이평20을 돌파하여 매수했다면 그 매수신호 다음봉에 청산하는 수식을 알고 싶습니다. 2 매수신호 이후 N봉에 청산하는 수식을 알고 싶습니다
프로필 이미지
jdavid
2023-03-24
1151
글번호 167493
시스템
답변완료

수식작성 부탁드립니다.

안녕하세요. 운영자님 아래 사이트의 트레이딩뷰 수식을 예스트레이더 수식으로 변환가능하신지 문의/부탁드립니다. 감사합니다. rsiPeriod = input(11, minval = 1, title = "RSI Period") bandLength = input(31, minval = 1, title = "Band Length") lengthrsipl = input(1, minval = 0, title = "Fast MA on RSI") lengthtradesl = input(9, minval = 1, title = "Slow MA on RSI") src = close // Source of Calculations (Close of Bar) r = rsi(src, rsiPeriod) // RSI of Close ma = sma(r, bandLength) // Moving Average of RSI [current] offs = (1.6185 * stdev(r, bandLength)) // Offset up = ma + offs // Upper Bands dn = ma - offs // Lower Bands mid = (up + dn) / 2 // Average of Upper and Lower Bands fastMA = sma(r, lengthrsipl) // Moving Average of RSI 2 bars back slowMA = sma(r, lengthtradesl) // Moving Average of RSI 7 bars back hline(30) // Oversold hline(50) // Midline hline(70) // Overbought upl = plot(up, "Upper Band", color = blue) // Upper Band dnl = plot(dn, "Lower Band", color = blue) // Lower Band midl = plot(mid, "Middle of Bands", color = orange, linewidth = 2) // Middle of Bands plot(slowMA, "Slow MA", color=green, linewidth=2) // Plot Slow MA plot(fastMA, "Fast MA", color=red, linewidth=2) // Plot Fast MA fill(upl, midl, red, transp=90) // Fill Upper Half Red fill(midl, dnl, green, transp=90) // Fill Lower Half Green
프로필 이미지
고박사122
2023-03-24
1080
글번호 167492
지표
답변완료

예비신호

안녕하세요? 예비신호에 나오는 프로그램이 잇고 없는 프로그램이 있습니다. 어떻게 해야 예비 신호가 전부 나오나요? Sell("S",Atmarket,def,1); 감사합니다.
프로필 이미지
대가들의매매
2023-03-24
1007
글번호 167491
시스템
답변완료

수식 문의 드립니다

항상 감사드립니다. 현재 아래의 수식은 진입이 항상 매수만 되는 수식인데, 매도도 진입가능한 (매수/매도 모두 진입가능한) 수식으로 바꿔주시면 감사드리겠습니다. Input : 매수장기이평길이(200), 매수단기이평길이(10), 매수RSI길이(2), 매수RSI기준(5), 매도이평(10), 매도RSI길이(2), 매도RSI기준(75); Var : longCondition(False), exitCondition(False); longCondition = ma(close, 매수장기이평길이) < close and ma(close, 매수단기이평길이) > Close and rsi(매수RSI길이) < 매수RSI기준; exitCondition = ma(close, 매도이평) < Close and rsi(매도RSI길이) > 매도RSI기준; if longCondition Then { Buy("매수", AtMarket); } if exitCondition Then { Exitlong("매도", AtMarket); }
프로필 이미지
행복곰
2023-03-24
1053
글번호 167489
시스템
답변완료

수식 문의드립니다.

5일선 10일선 골든크로스할때 매수를 하려하는데 봉이 완성되기 전 골든크로스가 일어나면 바로 매수할수있도록 수식을 만들고싶습니다. 현재는 신호는 발생하는데 골든크로스한 봉의 종가에서만 사지는데 봉이 완성되기전에 매수가 가능하도록 수식작성이 가능한지 궁금합니다.
프로필 이미지
망고맨
2023-03-24
1168
글번호 167487
시스템