커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

질문 3가지 드립니다

질문 1) input : P(5); var: cnt(0), a1(0) , a2(0); a1 = 0; For cnt = 0 to P-1 { if a1 == 0 or (a1 > 0 and DayLow(cnt) < a1) Then a1 = DayLow(cnt); } 이 식은 분봉에서 daylow 를 구하는 식인데 반대로 dayhigh 를 구하려면 식을 어떻게 작성하면 될까요? a2=0; For cnt = 0 to P-1 { if a2 == 0 or (a2 > 0 and dayhigh(cnt) < a2) Then a2 = dayhigh(cnt); } 이렇게 해봤는데 제대로 나오지가 않네요 수식에 대해서 이해도가 없어서 응용이 안되는데 간략하게 로직을 설명을 해주실 수 있을까요 a1=0; For cnt = 0 to P-1 {if a1 == 0 or (a1 > 0 and DayLow(cnt) < a1) Then a1 = DayLow(cnt);} cnt =0 to p-1 이 부분은 봉을 세는 수식인가요?0 부터 5-1=4 까지 5봉이라는 의미인거 같고 if 문에서 부터 몇 번 읽어봐도 잘 해석이 안됩니다 질문2) 위의 식을 편집기에서 고치고 "검증"을 눌러 바로 반영되게 하려고 하는데요, input 에서 선언된 변수들은 수정해도 반영이 안되고 차트상에서 변수 편집을 해야되네요. 편집기에서 바로 반영 하려면 var1=5; 을 선언하고 하니까 되는데 이 방법말고 input 에는 p(5) 라고 해놓고 별도로 p=10; 이라고 값을 다시 정의하면 "값을 대입할 수 잇는 변수나 배열의 요소가 와야합니다" 라고 에러가 나옵니다. input 에서 선언된 변수는 이런식으로는 수정 후 반영이 안되나요?~ 질문3) 분봉에서 혹시 틱 단위 (체결 횟수)를 설정하고 틱 갯수를 표현하는 식을 작성 할 수 있나요? 예를 들면 분봉차트 일정 구간에서 (3일동안) 100틱의 총갯수가 50개 이하로 나온 구간을 찾고 그 3일간의 최고가를 불러오는 식으로 만들고 싶은데 구현이 가능할까요?? 답변 주시면 감사하겠습니다 ~
프로필 이미지
yamu
2024-07-24
777
글번호 181827
지표
답변완료

거래량 음봉 돌파

거래량(음봉)의 고점을 거래량(양봉)이 돌파했을 때 진입하는 수식 요청드립니다. 1. 선행조건1 : 거래량(음봉) 연속 2개 발생 (only 2개) 2. 선행조건2 : 거래량(양봉) 연속 2개 발생 (only 2개) * 음봉음봉양봉양봉(4개)만 해당 3. 진입조건 : 양봉에서 작은 봉의 고점 > 음봉에서 큰 봉의 고점 if 선행조건1 and 선행조건2 and 진입조건 then buy(); *당일 발생봉부터 계산한다는 조건을 포함해 주십시요.(전일발생봉 배제) 항상 고맙습니다.
프로필 이미지
목마와숙녀
2024-08-01
923
글번호 181826
시스템
답변완료

파라볼릭 쌍바닥 조건

Input : af(0.02), maxAF(0.2); var :cSarv(0), T(0),B(0),S(0),tx(0),HH(0),LL(0),box(0),TL(0); var : Z(0),dd(0),tt(0); var1 = CSar(af,maxAF); plot1(var1, "CSAR",IFF(c>var1,Red,Blue)); cSarv = csar(af,maxAF); If crossup(c,cSarv) Then { var1 = cSarv; Var2 = var1[1]; if var1 <= var2+PriceScale*2 and var1 >= var2-PriceScale*2 and var2 > 0 Then { Tx = Text_New(sDate,sTime,var1-0.05,"●"); Text_SetColor(Tx,Magenta); Text_SetStyle(Tx,2,2); Text_SetSize(Tx,15); } } If CrossDown(c,cSarv) Then { var3 = csarv; Var4 = var3[1]; if var3 <= var4+PriceScale*1 and var3 >= var4-PriceScale*1 and var4 > 0 Then { Tx = Text_New(sDate,sTime,var3+0.05,"●"); Text_SetColor(Tx,Blue); Text_SetStyle(Tx,2,2); Text_SetSize(Tx,15); } } var5 = CSar(af,maxAF); if CrossUp(C,var5) Then { T = 1; B = var5; HH = H; dd = sDate; tt = sTime; box = Box_New(sDate,sTime,B,NextBarSdate,NextBarStime,HH); } if CrossDown(C,var5) Then { T = -1; S = var5; LL = L; dd = sDate; tt = sTime; box = Box_New(sDate,sTime,S,NextBarSdate,NextBarStime,LL); } if T == 1 Then { if var5 < B Then { B = var5; box_SetBegin(box,dd,tt,S); } if H > HH Then HH = H; Box_SetEnd(box,NextBarSdate,NextBarStime,hh); if HH < B+0.6 Then { Box_SetColor(box,Orange); Box_SetFill(box,true,120); } Else if HH >= B+0.6 and HH < B+0.8 Then { Box_SetColor(box,Gray); Box_SetFill(box,true,80); } Else if HH >= B+0.8 and HH < B+1.3 Then { Box_SetColor(box,Magenta); Box_SetFill(box,true,60); } Else if HH >= B+1.3 and HH < B+1.9 Then { Box_SetColor(box,Gray); Box_SetFill(box,true,60); } Else { Box_SetColor(box,Pink); Box_SetFill(box,true,90); } } if T == -1 Then { if var5 > S Then { S = var5; box_SetBegin(box,dd,tt,S); } if L < LL Then LL = L; Box_SetEnd(box,NextBarSdate,NextBarStime,LL); if LL > S-0.6 Then { Box_SetColor(box,Cyan); Box_SetFill(box,true,150); } Else if LL <= S-0.6 and ll > S-0.8 Then { Box_SetColor(box,Yellow); Box_SetFill(box,true,150); } Else if LL <= S-0.8 and ll > S-1.3 Then { Box_SetColor(box,Lime); Box_SetFill(box,true,120); } Else if LL <= S-1.3 and ll > S-1.6 Then { Box_SetColor(box,Cyan); Box_SetFill(box,true,90); } Else if LL <= S-1.6 and ll > S-1.9 Then { Box_SetColor(box,Blue); Box_SetFill(box,true,30); } Else { Box_SetColor(box,Yellow); Box_SetFill(box,true,120); } } 쌍바닥 쌍봉 수식에 단순하게 박스 수식을 더했더니, 쌍바닥에 오류가 많이 나옵니다. 수정 부탁 드립니다. 추가로 쌍바닥 쌍봉 조건을, 직전 100개 봉의 최고가에서, 0.8 아래에서만 동그라미 표시로 수정. (H100-0.8) 쌍봉은 반대로 직전 100개 봉의 최저가에서, 0.8 위에서만 쌍봉일 때 표시. 감사합니다.
프로필 이미지
고성
2024-07-24
892
글번호 181825
지표
답변완료

Data2 혼용시 텍스트 출력함수 문의드립니다.

안녕하세요! ㅇ ㅅㅇ// 사진첨부 내용과 같이 기본차트 : 60틱 Data2 : 1분 <틱차트&분차트>가 혼용된 상태에서 문서상 "Data2"를 사용하면 , 2번사진과 같이 [ text_delete( ) ]에 대한부분이 이상해져서 문의 드립니다. 참조데이터(Data2)를 사용 하더라도 1번사진과 같이 "예문"을 가장 최근캔들에만 나오게 하려면 어떻게 문서를 작성하여야 하는지 궁금합니다! 매번 도움 주셔서 감사합니다! ㅠ ㅅㅠ // #------------------↓사용된지표식↓------------------# var : 가정a(0); 가정a = C; /* var : 가정a(0,Data2); 가정a = Data2(C); */ var : tx(0); text_delete(tx); tx = text_New( Sdate , Stime , c , "예문" ); Text_SetStyle( tx , 0, 0); //←글자위치 Text_SetSize( tx , 12); //←폰트크기 Text_SetBold( tx , 1); //←폰트굵기 Text_SetColor( tx , Black ); //←문자색깔 #------------------↑사용된지표식↑------------------#
프로필 이미지
쾌감
2024-07-24
710
글번호 181824
지표
답변완료

키움신호를 종목검색식으로

A = BBandsUP(20,2); B = (highest(h, 9) + lowest(l, 9))/2; D = (highest(h, 26) + lowest(l, 26))/2; B*1.02 >= A and B*0.98 <= A and D*1.02 >= A and D*0.98 <= A 감사합니다 그리고 (선행스팬1) 20일 신고가종목 검색식도 부탁드려요
프로필 이미지
박셰프
2024-07-24
706
글번호 181823
종목검색

살빼고싶다 님에 의해서 삭제되었습니다.

프로필 이미지
살빼고싶다
2024-07-24
29
글번호 181822
검색
답변완료

문의드립니다.

안녕하세요? 종가가 주봉120 이평선과 일봉 240 이평선과의 비교로 종가>주봉120 이평선 && 종가>일봉240 어떻게 표현하는지 예스의 종목검색식 문의드립니다.
프로필 이미지
건시하
2024-07-23
504
글번호 181821
검색
답변완료

예스랭귀지로 변환부탁드립니다

아래는 전월고가돌파, 전월종가돌파, 당월시가돌파 의 키움수식입니다. 3종의 예스랭귀지로 변환 부탁드립니다. [전월고가돌파] A1 = floor(date / 100); A2 = A1 % 100; A3 = HighestSince(1,A2 !=A2(1) && A2 != 12, H); A4 = Valuewhen(1, A2 != A2(1), A3(1)) Crossup(c,A4) [전월종가돌파] A1 = floor(date / 100); A2 = A1 % 100; A3 = HighestSince(1,A2 !=A2(1) && A2 != 12, C); A4 = Valuewhen(1, A2 != A2(1), A3(1)) Crossup(c,A4) [당월시가돌파] A = floor(date / 100); A2 = A% 100; A3 = ValueWhen(1, A2!=A2(1), O) Crossup(c,A3) 또한, 수식으로 전월평균고가를 어떻게 표현하면되나요?
프로필 이미지
건시하
2024-07-23
701
글번호 181820
종목검색

관리자에 의해 예스스팟 QnA로 이동되었습니다

프로필 이미지
1000djr
2024-07-25
22
글번호 181819
시스템
답변완료

문의 드립니다.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; FX365_Thailand //Revision history //v100.0 First release //v101.0 Added alert conditions for swing high/low creation //v107.0 Added alert conditions for liquidity raid //v110.0 20240119 // Added an option to display liquidity pools //@version=5 indicator('Liquidity Pools', shorttitle='Liquidity Pools(SABAI SABAI FX)', max_lines_count=500,overlay=true) //Users' input ------ len_l = input.int(4, 'Left bar&Right bar', minval=1,group="Swing High Low Setting") flg_shsl = input.bool(true, 'Show Swing High Swing Low') flg_lq = input.bool(true, 'Show Liquidity Pools',group="Liquidity Pools Settings") i_width = input.int(1, 'Line Width', minval=1,maxval=6) i_linestyle = input.string(defval=line.style_dotted,options=[line.style_solid,line.style_dashed,line.style_dotted],title="Line Style") i_linecolor_bs = input.color(color.new(#ff5252,65),title="Buy Side Liquidity Color") i_linecolor_ss = input.color(color.new(#0ef30e,65),title="Sell Side Liquidity Color") h = high l = low //Identify swingh high/low ----- swing_h = barstate.isconfirmed ? ta.pivothigh(h, len_l, len_l) : na swing_l = barstate.isconfirmed ? ta.pivotlow(l, len_l, len_l) : na //Value of Swing High/Swing Low LSH = ta.valuewhen(swing_h, high[len_l], 0) LSL = ta.valuewhen(swing_l, low[len_l], 0) plotshape(flg_shsl ? swing_h : na, color=color.new(color.gray, 0), style=shape.labeldown, title='Swing High', text='SH', textcolor=color.new(color.white, 0), location=location.abovebar, offset=-len_l,size=size.tiny) plotshape(flg_shsl ? swing_l : na, color=color.new(color.gray, 0), style=shape.labelup, title='Swing Low', text='SL', textcolor=color.new(color.white, 0), location=location.belowbar, offset=-len_l,size=size.tiny) //Draw liquidity pools //Variables var line lin_BSLQ_upper = na var line lin_BSLQ_lower = na var line lin_SSLQ_upper = na var line lin_SSLQ_lower = na //Threshold thresh = timeframe.isseconds ? 1.0001 : (timeframe.period == "60" and timeframe.period=="240") ? 3 : (timeframe.isminutes and timeframe.period != "60" and timeframe.period != "240") ? 1.0001 : timeframe.isdaily ? 1.005 : timeframe.isweekly ? 1.01 : timeframe.ismonthly ? 1.01 : 1.001 thresh_ = timeframe.isseconds ? 0.9999 : (timeframe.period == "60" and timeframe.period=="240") ? 3 : (timeframe.isminutes and timeframe.period != "60" and timeframe.period != "240") ? 0.9999 : timeframe.isdaily ? 0.995 : timeframe.isweekly ? 0.99 : timeframe.ismonthly ? 0.99 : 0.999 //Lines if swing_h lin_BSLQ_lower := flg_lq ? line.new(x1=bar_index-len_l,x2=bar_index, y1=LSH,y2=LSH,color=i_linecolor_bs,style= i_linestyle,width = i_width) : na if swing_h lin_BSLQ_upper := flg_lq ? line.new(x1=bar_index-len_l,x2=bar_index, y1=LSH*thresh,y2=LSH*thresh,color=i_linecolor_bs,style= i_linestyle,width = i_width) : na if swing_l lin_SSLQ_lower := flg_lq ? line.new(x1=bar_index-len_l,x2=bar_index, y1=LSL*thresh_,y2=LSL*thresh_,color=i_linecolor_ss,style=i_linestyle,width = i_width) : na if swing_l lin_SSLQ_upper := flg_lq ? line.new(x1=bar_index-len_l,x2=bar_index, y1=LSL,y2=LSL,color=i_linecolor_ss,style= i_linestyle,width = i_width) : na //Fill linefill.new(lin_BSLQ_upper,lin_BSLQ_lower,color=i_linecolor_bs) linefill.new(lin_SSLQ_upper,lin_SSLQ_lower,color=i_linecolor_ss) //Alert conditions //Swing high low creation alertcondition(swing_h,message="Swing High Created", title="Swing High") alertcondition(swing_l,message="Swing Low Created", title="Swing Low") //Reach liquidity zone alertcondition(ta.crossover(high,LSH),message="Price reached buy side liquidity", title="Buy Side Liquidity Raid") alertcondition(ta.crossunder(low,LSL),message="Price reached sell side liquidity", title="Sell Side Liquidity Raid") 트레이딩뷰 지표인데 예스로 좀 바꿔주세요.
프로필 이미지
신대륙발견
2024-07-23
919
글번호 181818
지표