커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

지표 문의드립니다.

안녕하세요. 언제나 감사드립니다. 혼자 며칠동안 고민하다가 질문 드립니다. 현재봉의 볼린저 밴드폭이 과거 밴드폭의 어느 수준에 해당하는지를 정규화하여 나타내려고 합니다. 볼린저 밴드는 (20, 2)를 사용하였고, 과거 N일간의(아래 수식에서는 Period2) 밴드폭의 평균과 표준편차를 이용해 정규화를 하려고 합니다. Z = (현재값 - 평균) / 표준편차 다음과 같이 작성해보았습니다. Input : Period1(20), Period2(60), Dis(2); var : BWidth(0), BWMean(0), BWstd(0), Z(0); BWidth = BollBandUp(Period1, Dis, 1, close) - BollBandDown(Period1, Dis, 1, close); BWMean = MA(BWidth, Period2, 1); BWstd = STD(BWidth, Period2); Z = (BWidth - BWMean)/BWstd; Plot1(Z, "Zscore"); 수식 검증을 마쳤고, 지표에 등록도 했는데, 사진과 같이 아무것도 표시되지 않습니다. (다른 사용자지표는 정상적으로 표시됨) 혼자 수십번 다르게 테스트 해보았는데, 제 생각에는 밴드폭의 평균과 표준편차를 MA, STD 함수를 이용하여 구한 것에서 오류가 생기는 것 같은데, 이러한 이유가 맞나요? 또, 옳게 작성된 지표도 궁금합니다.
프로필 이미지
데이터분석가
2021-11-04
620
글번호 153370
지표
답변완료

heiken ashi 지표봉차트필요 합니다 강조식 지표보기 불편하네요 ㅜㅜ

시스템 거래목적은아니구요 수동거래하기때문에 일반 봉차트는 보기불편해요 heiken ashi 지표 봉차트 사진 첨부해드림니다 종은하루되세요 ^^
프로필 이미지
bobo111
2021-11-03
630
글번호 153369
지표
답변완료

주첫캔들을 월첫캔들로 변경

if Bdate != Bdate[1] Then { Condition1 = False; if DayOfWeek(Bdate) < DayOfWeek(Bdate[1]) Then Condition1 = true; } if Condition1 == true Then { var1 = DayOpen; var2 = DayHigh; var3 = DayLow; var4 = DayClose; } if var1 > 0 Then { Plot1(var1,"주첫날시가"); Plot2(var2,"주첫날고가"); Plot3(var3,"주첫날저가"); Plot4(var4,"주첫날종가"); } 위수식을 월첫날캔들로 변경 부탁드립니다
프로필 이미지
팔보채
2021-11-03
461
글번호 153367
지표
답변완료

함수요청

안녕하세요? 아래 글번호 74517번 지표 검증 요청드립니다. 국낸연결선물 1분봉에 적용해도 표시되지 않습니다.
프로필 이미지
흰둥이아빠
2021-11-03
492
글번호 153360
지표
답변완료

문의 드립니다.~~~~

답변주신 내용으로 햬결이 되지 않아 추가 요청을 더해 다시 부탁드립니다~ <진입> 진입은 아래 수식에서 설정된 시간대별로 구분되어 매일 진입이 실행되도록 시간대 설정 (왜그런지 아래식에서는 23시에서 1시까지는 진입이 이루어지지 않습니다.) <청산> 1, 설정된 각 시간대 내에서는 청산 조건이 충족되면 수식 그대로 청산 및 스위칭 재진입 2, 설정된 각 시간내에서 청산 조건이 충족 되지 않아 포지션을 가지고 각 시간대를 지날때에는 청산 조건이 충족되면 스위칭 재진입 없이 청산만 이루어지도록 부탁드립니다~~~ 항상 감사합니다 건강하세요~`` input : 진입틱수(10); input : 최소손실틱(0),손실감소틱(10); input : StartTime1(70000),EndTime1(100000); input : StartTime2(110000),EndTime2(130000); input : StartTime3(150000),EndTime3(180000); input : StartTime4(230000),EndTime4(010000); var : Tcond(false); var : OO(0),HH(0),LL(0); if (sdate != sdate[1] and stime >= EndTime1) or (sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime1) or (sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then { Tcond = true; OO = O; HH = H; LL = L; } if (sdate != sdate[1] and stime >= EndTime2) or (sdate == sdate[1] and stime >= EndTime2 and stime[1] < EndTime2) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime2) or (sdate == sdate[1] and stime >= StartTime2 and stime[1] < StartTime2) Then { Tcond = true; OO = O; HH = H; LL = L; } if (sdate != sdate[1] and stime >= EndTime3) or (sdate == sdate[1] and stime >= EndTime3 and stime[1] < EndTime3) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime3) or (sdate == sdate[1] and stime >= StartTime3 and stime[1] < StartTime3) Then { Tcond = true; OO = O; HH = H; LL = L; } if (sdate != sdate[1] and stime >= EndTime4) or (sdate == sdate[1] and stime >= EndTime4 and stime[1] < EndTime4) Then { Tcond = False; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } if Tcond == true Then { if MarketPosition == 0 and OO > 0 and LL > OO-PriceScale*진입틱수 Then Sell("하루시작매도",AtLimit,LL+PriceScale*진입틱수); if MarketPosition == 0 and OO > 0 and HH < OO+PriceScale*진입틱수 Then Buy("하루시작메수",AtLimit,HH-PriceScale*진입틱수); } if MarketPosition == 1 Then { Sell("Bp",AtLimit,EntryPrice+PriceScale*진입틱수); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*최소손실틱 Then Sell("sx",AtLimit,Lowest(L,BarsSinceEntry)+PriceScale*손실감소틱); } if MarketPosition == -1 Then { Buy("sp",AtLimit,EntryPrice-PriceScale*진입틱수); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*최소손실틱 Then Buy("bx",AtLimit,highest(H,BarsSinceEntry)-PriceScale*손실감소틱); }
프로필 이미지
예스요
2021-11-04
690
글번호 153357
시스템
답변완료

&#8203;&#8203;&#8203;해외선물 타주기 시스템 변환

&#8203;&#8203;&#8203;항상 감사드립니다 &#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;아래 조건식을 타주기챠트에 적용할수있도록 변환하여주시기 바랍니다 ***************************************************** input:period90(20),횡보율(0.0006); var : var301(0),var321(0); var : t60(0),t70(0); var301=ema(c,period90); var321=ema(c,period90+20); value1 = 0; value2 = 0; value3 = 0; if var301>var301[1]*(1+횡보율/100) then value1 = value1+1; else if var301<var301[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var321>var321[1]*(1+횡보율/100) then value1 = value1+1; else if var321<var321[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if Var301>Var321 Then t60 = 1 ; else if Var301<Var321 Then t60 = -1; if value1 == 2 Then t70 = 1 ; else if value2 == 2 Then t70 = -1; Else if value3 == 2 Then t70 = 0; /****************************************************/ var : entrycnt(0); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then # 현지시간_뉴욕 17:00 장시작 # Entrycnt = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then Entrycnt = Entrycnt+1; if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지# T60==1 then buy("B1"); if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) or (MarketPosition == 1)) and #동일방향 재진입금지# T60==-1 Then sell("S1"); /***********************************************/ if MarketPosition == 1 and T70==-1 Then exitlong("eB_B"); if MarketPosition == -1 and T70==1 Then ExitShort("eS_S");
프로필 이미지
조민철
2021-11-03
869
글번호 153351
시스템
답변완료

문의드립니다.

1.codecategoryex의 미니코스피선물과 위클리콜옵션 풋옵션의 코드를 알고 싶습니다. 어디서 찾아봐야하는지 않나오네요. 2.var1의 소수점 2째자리까지의 크기를 비교하고싶습니다. 예로 if var1 > var1[1] then var2 = 1; var1의 소수점 2째자리까지의 크기보다 var[1] 소수점2째자리까지의 크기가 작을 경우 var2 = 1; if int(var1*100) > int(var1[1]*100) then var2 = 1; 이런식으로 작성했더니 지표출력 plot1 소수2째자리 값이 전봉값보다 커지지 않았는데 var2 = 1;로 출력이 되서요. 답변부탁드려요 수고하세요^^
프로필 이미지
아싸가오리
2021-11-03
896
글번호 153346
지표
답변완료

문의 드립니다

value1 = (c,Data2)/2; D2의 현재가를 2로 나눈값.... 를 표시하고 싶은데 위와 같이 하니까 오류라고 뜨네요 수정 좀 부탁드립니다.. 감사합니다
프로필 이미지
러블리
2021-11-03
731
글번호 153340
지표
답변완료

수식 부탁드립니다

input : StartTime(233000),EndTime(030000); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(Endtime); if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; SetStopEndofday(0); } var : entry(0); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*20); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*20); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*30); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*30); --------------------------- 위 시스템의 매매신호는 당일 고저가대비 매수,매도의 청산 수식 입니다. 수정할것은 당일 고저가대비 매수,매도의 신호에서 청산은 그 진입신호에서 틱폭의 숫자만큼 청산이 되도록 부탁드립니다 늘 감사합니다
프로필 이미지
푸른
2021-11-04
776
글번호 153337
시스템
답변완료

신호표시

항상 도움 주심에 감사드립니다^^ 아래 두조건을 모두 만족 할 때에만 신호가 발생되게 부탁드립니다. 그리고 2)번 조건식을 지표식으로 바꿀수 있는지와 지표식으로 바꿀때 기호로 표시되게하고 색상까지 넣을수 있다면 모두 부탁드립니다. 감사합니다^^ 1)종가가 5일 20일선을 동시에 돌파시 var1 = ma(c,5); Var2 = ma(C,20); Condition1 = C > max(var1,Var2) and min(var1,Var2) > O; Condition2 = O > max(var1,Var2) and min(var1,Var2) > C; #b1 if Condition1 == true Then Buy("★"); #s1 if Condition2 == true Then Sell(" ★ "); 2)단기 추세선이 선행스팬1을 돌파시 var : 전환선(0),단기추세선(0),선행스팬1(0),선행스팬2(0); 전환선 = (highest(H,1)+lowest(L,1))/2; 단기추세선 = (highest(H,26)+lowest(L,26))/2; 선행스팬1 = (전환선+단기추세선)/2; 선행스팬2 = (highest(H,52)+lowest(L,52))/2; #b2 if 선행스팬1 > 단기추세선 Then Buy("▲"); #s2 if 선행스팬1 < 단기추세선 Then sell("▼");
프로필 이미지
체리피커
2021-11-03
899
글번호 153336
시스템