커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

안녕하세요^^

안녕하세요^^ 시스템식 작성해 주셔서 감사드립니다. 덕분에 시스템의 기본틀, 어순, 제가 필요함 함수 모두 인지하여 좋은 시스템 만들수 있겠끔 응용이 가능해 졌습니다. 완성 후 보답 하겠습니다. 얼마 남지 한은 한해 송구영신하시고 복 많이 받으시며 행복하시기를 바라겠습니다. 감사합니다^^.
프로필 이미지
yjh7474
2022-12-21
1397
글번호 164784
시스템
답변완료

수정부탁드립니다

강조식 부탁드립니다. input : i_lenHARSI(14),i_smoothing(7),i_lenRSI(7); var : i_colUp(0),i_colDown(0),i_colWick(0),i_source(0); var : _closeRSI(0),_openRSI(0),_highRSI_raw(0),_lowRSI_raw(0); var : _highRSI(0),_lowRSI(0),_close(0),_open(0),_high(0),_low(0); Var : cnt(0), DownAmt1(0), UpAmt1(0), UpSum1(0), DownSum1(0), UpAvg1(0), DownAvg1(0),RSIV1(0); Var : DownAmt2(0), UpAmt2(0), UpSum2(0), DownSum2(0), UpAvg2(0), DownAvg2(0),RSIV2(0); var : bodyColour(0),wickColour(0); i_colUp = red; i_colDown = teal; i_colWick = gray; i_source = (o+h+l+c)/4; _closeRSI = rsi(i_lenHARSI)-50; _openRSI = IFF(IsNaN(_closeRSI[1]) == False, _closeRSI[1], _closeRSI); If CurrentBar == 1 AND i_lenHARSI > 0 Then Begin UpSum1 = 0; DownSum1 = 0; For cnt = 0 To i_lenHARSI - 1 Begin UpAmt1 = H[cnt] - H[cnt+1]; If UpAmt1 >= 0 Then DownAmt1 = 0; Else Begin DownAmt1 = -UpAmt1; UpAmt1 = 0; End; UpSum1 = UpSum1 + UpAmt1; DownSum1 = DownSum1 + DownAmt1; End; UpAvg1 = UpSum1 / i_lenHARSI; DownAvg1 = DownSum1 / i_lenHARSI; End Else If CurrentBar > 1 AND i_lenHARSI > 0 Then Begin UpAmt1 = H[0] - H[1]; If UpAmt1 >= 0 Then DownAmt1 = 0; Else Begin DownAmt1 = -UpAmt1; UpAmt1 = 0; End; UpAvg1 = (UpAvg1[1] * (i_lenHARSI - 1) + UpAmt1) / i_lenHARSI; DownAvg1 = (DownAvg1[1] * (i_lenHARSI - 1) + DownAmt1) / i_lenHARSI; End; If UpAvg1 + DownAvg1 <> 0 Then RSIV1 = 100 * UpAvg1 / (UpAvg1 + DownAvg1); Else RSIV1 = 0; If CurrentBar == 1 AND i_lenHARSI > 0 Then Begin UpSum2 = 0; DownSum2 = 0; For cnt = 0 To i_lenHARSI - 1 Begin UpAmt2 = L[cnt] - L[cnt+1]; If UpAmt2 >= 0 Then DownAmt2 = 0; Else Begin DownAmt2 = -UpAmt2; UpAmt2 = 0; End; UpSum2 = UpSum2 + UpAmt2; DownSum2 = DownSum2 + DownAmt2; End; UpAvg2 = UpSum2 / i_lenHARSI; DownAvg2 = DownSum2 / i_lenHARSI; End Else If CurrentBar > 2 AND i_lenHARSI > 0 Then Begin UpAmt2 = L[0] - L[1]; If UpAmt2 >= 0 Then DownAmt2 = 0; Else Begin DownAmt2 = -UpAmt2; UpAmt2 = 0; End; UpAvg2 = (UpAvg2[1] * (i_lenHARSI - 1) + UpAmt2) / i_lenHARSI; DownAvg2 = (DownAvg2[1] * (i_lenHARSI - 1) + DownAmt2) / i_lenHARSI; End; If UpAvg2 + DownAvg2 <> 0 Then RSIV2 = 100 * UpAvg2 / (UpAvg2 + DownAvg2); Else RSIV2 = 0; _highRSI_raw = RSIV1-50; _lowRSI_raw = RSIV2-50; _highRSI = max(_highRSI_raw, _lowRSI_raw); _lowRSI = min(_highRSI_raw, _lowRSI_raw); _close = (_openRSI + _highRSI + _lowRSI + _closeRSI) / 4; _open = iff(isnan(_open[i_smoothing]) == true, (_openRSI + _closeRSI) / 2 , (_open[1] * i_smoothing + _close[1]) / (i_smoothing + 1)); _high = max(_highRSI, max(_open, _close)); _low = min(_lowRSI, min(_open, _close)); bodyColour = iff(_close > _open , i_colUp , i_colDown); wickColour = i_colWick; var1 = TL_New_Self(sDate,sTime,_open,sDate,sTime,_close); var2 = TL_New_Self(sDate,sTime,_high,sDate,sTime,max(_open,_close)); var3 = TL_New_Self(sDate,sTime,_Low,sDate,sTime,min(_open,_close)); TL_SetColor(var1,bodyColour); TL_SetColor(var2,i_colWick); TL_SetColor(var2,i_colWick); TL_SetSize(var1,3); TL_SetSize(var2,1); TL_SetSize(var3,1);
프로필 이미지
외국인
2022-12-21
1323
글번호 164782
지표
답변완료

수정 의뢰드립니다

안녕하세요! 아래의 수식은 일간의 고,저,종가를 이용하여 만든 피봇지표입니다. 이수식을 가능하다면 주간과 월간의 고,저,종가를 이용하여 만든 피봇지표로 각각 수정을 부탁드립니다! 항상 노고에 감사드립니다! input : 수치표시(1); Var : preHigh(0), preLow(0), preClose(0), HighV(0), LowV(0); Var : Pivot(0),R1(0),R2(0),S1(0),S2(0); Var : TX1(0), TX2(0), TX3(0), TX4(0), TX5(0); if BarInterval <= 60 and DataCompress < 3 Then { if sTime-sTime[1] > 4000 or sTime-sTime[1] < 0 Then { preHigh = HighV[1]; preLow = LowV[1]; preClose = C[1]; HighV = H; LowV = L; } if H > highV Then HighV = H; if L < LowV Then LowV = L; Pivot = (preHigh+preLow+preClose)/3; R1 = 2*Pivot-preLow; R2 = Pivot+preHigh-preLow; S1 = 2*Pivot-preHigh; S2 = Pivot-preHigh+preLow; Plot1(Pivot, "피봇포인트", GRAy, 0, 1); Plot2(R1, "1차저항", RED, 0,1); Plot3(R2, "2차저항", PINk, 0,1); Plot4(S1, "1차지지", GREEN, 0, 1); Plot5(S2, "2차지지", LGREEN, 0, 1); if 수치표시 == 1 and sTime-sTime[1] > 4000 or sTime-sTime[1] < 0 Then { TX1 = Text_New(sdate, stime, Pivot, "▶PV : "+Numtostr(Pivot,2)); Text_SetStyle(TX1, 1, 2); Text_setColor(TX1, GRAY); TX2 = Text_New(sdate, stime, R1, "▶R1 : "+Numtostr(R1,2)); Text_SetStyle(TX2, 1, 2); Text_setColor(TX2, red); TX3 = Text_New(sdate, stime, R2, "▶R2 : "+Numtostr(R2,2)); Text_SetStyle(TX3, 1, 2); Text_setColor(TX3, red); TX4 = Text_New(sdate, stime, S1, "▶S1 : "+Numtostr(S1,2)); Text_SetStyle(TX4, 1, 2); Text_setColor(TX4, GREEN); TX5 = Text_New(sdate, stime, S2, "▶S2 : "+Numtostr(S2,2)); Text_SetStyle(TX5, 1, 2); Text_setColor(TX5, GREEN); } } --------------------------------------------- 아래 함수가 잘 못 되었다고 계속 에러가 뜨네요! 확인 좀 부탁드립니다! input : N(numeric); var : cnt(0); array : MO[99](0); if index() == 0 then MO[1] = O; if index() > 0 then{ if date > date[1]+30 then{ MO[0] = O; for cnt = 1 to 98{ MO[cnt] = MO[cnt-1][1]; } } } MonthOpen = MO[N]; Input : N(numeric); var : cnt(0); array : MH[99](0); if index() == 0 then MH[0] = H; if date > date[1]+30 then{ MH[0] = H; for cnt = 1 to 20{ MH[cnt] = MH[cnt-1][1]; } } if H > MH[0] then{ MH[0] = H; } MonthHigh = MH[N]; Input : N(numeric); var : cnt(0); array : ML[99](0); if index() == 0 then ML[0] = L; if index() > 0 then{ if date > date[1]+30 then{ ML[0] = L; for cnt = 1 to 20{ ML[cnt] = ML[cnt-1][1]; } } } if L < ML[0] then{ ML[0] = L; } MonthLow = ML[N]; input : N(numeric); var : cnt(0); array : MC[99](0); if date > date[1]+30 then{ for cnt = 1 to 98{ MC[cnt] = MC[cnt-1][1]; } } MC[0] = C; Monthclose = MC[N]; -------- WeekOpen input:n(numeric); var:j(0),요일(0); array:weekO[100](0); 요일 = DayOfWeek(date); if date[1] < date and 요일[1] >= 요일 then { for j = 99 downto 1 { weekO[j] = weekO[j-1]; } weekO[0] = o; } WeekOpen = weekO[n]; WeekHigh Input : N(numeric); var : cnt(0); array : WH[99](0); if DayOfWeek(date) < DayOfWeek(date)[1] then{ WH[0] = H; for cnt = 1 to 20{ WH[cnt] = WH[cnt-1][1]; } } if H > WH[0] then{ WH[0] = H; } WeekHigh = WH[N]; WeekLow Input : N(numeric); var : cnt(0); array : WL[99](0); if DayOfWeek(date) < DayOfWeek(date)[1] then{ WL[0] = L; for cnt = 1 to 20{ WL[cnt] = WL[cnt-1][1]; } } if L < WL[0] then{ WL[0] = L; } WeekLow = WL[N]; WeekClose input : N(numeric); var : cnt(0); array : WC[99](0); if DayOfWeek(date) < DayOfWeek(date)[1] then{ for cnt = 1 to 98{ WC[cnt] = WC[cnt-1][1]; } } WC[0] = C; Weekclose = WC[N]; ---------
프로필 이미지
qha71
2022-12-21
1262
글번호 164781
지표
답변완료

수식부탁드립니다---------------------

//mc가 당일 최저점에서 5%상승한지점을 plot22로 표시하고 싶슴니다 수식 부탁드립니다. //********************************************************************************* Input : Period(10), P(2),소리내기(0),차트시간(090000); var : UPchennel(0),UPline(0),Dnline(0),DNchennel(0),mc(0),opd(0); UPchennel = ma(H,period)*(1+P/100); UPline = ma(H,period); dnline = ma(L,period); DNchennel = ma(L,period)*(1-P/100); mc = c; Plot1(UPchennel, "상한채널"); Plot2(UPline, "상한선"); Plot3(dnline, "하한선"); Plot4(DNchennel, "하한채널"); plot5(mc,"변동성지수"); if dnline > dnline[1] Then{ plot6(mc,"상승"); } if dnline < dnline[1] Then{ plot7(mc,"하락"); } if CrossDown(mc,dnline) Then{ plot8(dnline+0.03,"진입고려"); if 소리내기 == 1 then { PlaySound("C:₩Users₩Windows 10₩Desktop₩sound₩bubbles.wav"); } } //if sTime == 090000 Then{ //plot9(dnline,"장시작"); //} if stime >= 차트시간 and stime <= 차트시간+100 then{ plot20(dnline,"시작"); } opd= (opend(0)); plot21(opd,"장시작" );
프로필 이미지
leekss1
2022-12-21
1237
글번호 164780
지표
답변완료

봉 평균 수식 부탁드립니다.

현재봉 이전 4개/19개/59개의봉의 평균값을 구하여 차트의 한쪽켠에 숫자가 나타나게 하는 방법좀 알려주세요 그리고 숫자의 색깔을 구별할수 있게 수식 부탁드리겠습니다.
프로필 이미지
1004g상방
2022-12-21
1055
글번호 164779
지표
답변완료

수식추가

input : P1(45),D1(2.3); input : P2(22),D2(1.8); input : P(20); var1 = BollBandDown(P1,D1); Var2 = BollBandDown(P2,D2); Var3 = ma(C,P); if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; } if Condition1 == False and CountIf(L > var1,2) == 2 and c > var3 Then Buy("b1",AtLimit,var1); if Condition2 == False and CountIf(L > var2,2) == 2 and c < Var3 Then Buy("b2",AtLimit,var2); 안녕하세요 위식에서 매도식추가갸 부탁드립니다
프로필 이미지
아트정
2022-12-21
1061
글번호 164774
시스템
답변완료

수식 작성 부탁드립니다

1. 지표 data1에 아래의 수식을 사용합니다 data2에서 동일한 수식을 사용할려고 합니다. factor(5), AtrPeriod(20) 의 외부변수등 facto2r(5), AtrPeriod2(20)로변경하여 시스템작성시 중복되 않게 작성 부탁드립니다 input : ntime(30),factor(5), AtrPeriod(20); var : S1(0),D1(0),TM(0),TF(0),HH(0),LL(0),C1(0); var : src(0), AtrV(0),ATRv1(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0); var : prevSuperTrend(0), superTrend(0), direction(0),alpha(0),source(0); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF = TM%ntime; if Bdate != Bdate[1] or (Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or (Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or (Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then { HH = H; LL = L; C1 = C[1]; ATRV1 = ATRV[1]; prevSuperTrend = superTrend[1]; prevLowerBand = lowerBand[1]; prevUpperBand = upperBand[1]; } if H > HH Then HH = H; if L < LL Then LL = L; src = (HH+LL)/2; if C1 > 0 Then { alpha = 1 / AtrPeriod ; source = max(HH - LL, abs(HH - C1), abs(LL - C1)); ATrV = alpha * source + (1 - alpha) * ATrV1; upperBand = src + factor * AtrV; lowerBand = src - factor * AtrV; if lowerBand > prevLowerBand or C1 < prevLowerBand Then lowerBand = lowerBand; Else lowerBand = prevLowerBand; if upperBand < prevUpperBand or C1 > prevUpperBand Then upperBand = upperBand; Else upperBand = prevUpperBand; if prevSuperTrend == prevUpperBand Then { if C > upperBand Then direction = -1; Else direction = 1; } Else { if C < lowerBand Then direction = 1; Else direction = -1; } if direction == -1 Then superTrend = lowerBand; Else superTrend = upperBand; Plot1(C,"종가"); } } 2. 시스템 식에서 BBup = BollBandUp(Period,MultiD); 상단밴드 이격도 95 하향돌파시 즉시 청산이되도록 수식 부탁드립니다. 추가로 상단밴드에서 5틱 하락시 청산되도록 수식 부탁 드립니다. 감사합니다.
프로필 이미지
뎅이요
2022-12-21
1130
글번호 164773
지표
답변완료

수식 질문드립니다.

포지션 잡고있고, 손실을 1.6pt 기록중인데 중간에 수식에 의해서 손절이 1.1pt 로 바뀌면 어떻게 되나요? 즉시 손절이 나가나요? 아니면 1.1pt 손실점에서 손절이 나가나요? var : 손절(1.92),익절(2.42); SetStopEndofday(EndTime); SetStopProfittarget(익절,PointStop); SetStoploss(손절,PointStop);
프로필 이미지
캣피쉬
2022-12-21
1137
글번호 164761
시스템
답변완료

문의드립니다.

1. 피봇 1차 저항선을 5틱이상 돌파, 상승한 이후 하락하여 피봇 1차 지지선을 10틱이상 붕괴할때 매도 피봇 1차 지지선을 5틱이상 붕괴, 하락한 이후 상승하여 피봇 1차 저항선을 10틱이상 돌파할때 매수 2. 국내선물 3분봉 매매에서 5, 20선 골든/데드클로스 매매를 할때 매수신호 조건이 완성되더라도 참고에서 프로그램순매수가 직전 10봉중에서 6봉이상이 음봉이면 신호가 안나오게 할 수 있는지 문의드립니다. 매도는 그 반대입니다. 만일 이부분 구현이 안된다면 프로그램순매수금액의 시초기준 고점(저점)대비 20% 감소(증가)시 신호가 안나오게 만들고 싶습니다. 노고에 늘 감사드립니다~
프로필 이미지
카르마다
2022-12-21
1317
글번호 164760
시스템
답변완료

수식

안녕하세요. 봉의 몸통이 0.4이상인 봉의 고가,저가,시가,종가 부탁드립니다. 당일 발생분은 당일 챠트에만 나오도록 부탁드립니다. 감사합니다.
프로필 이미지
한국사람73
2022-12-21
1269
글번호 164758
지표