답변완료
문의
데이트레이딩084500부터 154500까지 거래아래 수식은 거래횟수 20회까지 허용, 누적패수 3회면 거래중지 수식입니다.연속으로 2패할 경우, "거래횟수" 20회를 3회로 변동하는 수식을 요청드립니다.어제 요청드리고 답변 받은 내용은거래횟수 20회까지 허용, 누적패수 5회면 거래중지 수식이었고 연속으로 3패할 경우 , "누적패수" 5회를 4회로 조정하는 수식을 요청드린 바 있습니다. 위 내용은 "거래횟수" 조정입니다. 어제 것과 다르므로 참고하시라고 적었습니다.항상 고맙습니다.************************************************************************************************************************************************input : 진입시간(084700),진입제한시간(125000);input : 거래횟수(20),누적패수(3);input : b1(54),진입눌림1(6),진입돌파1(4);input : b2(142),진입눌림2(6),진입돌파2(4);input : als(42),atr1(0),atr2(112);input : bls(70),btr1(0),btr2(132);var : T1(0),entry(0),HH(0),LL(0),EH(0),EL(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0);var : Tcond(false);Var : loss(0); if bdate != bdate[1] Then loss = 0; if TotalTrades > TotalTrades[1] and PositionProfit(1) < 0 Then loss = loss+1; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{ T1 = TotalTrades; E1 = 0; HH = H; } if stime >= 진입시간 then{ if H > HH Then HH = H; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 Then{ if E1 == 0 and C <= HH-PriceScale*B1 Then{ E1 = 1; L1 = L; i1 = index; V1 = HH; //시작점 종가 } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; #고가가 시작봉종가보다 작을 때만 눌림체크 if H <= V1 and H >= L1+PriceScale*진입눌림1 Then{ E1 = 2; i1 = index; S1 = L1; } } //시작점 종가보다 높은 가격이 발생하면 초기화 if E1 >= 1 and H > V1 Then{ E1 = 0; HH = H; } if loss < 누적패수 and E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파1 and Tcond == true Then{ sell("s1"); } } if TotalTrades > TotalTrades[1] Then{ E1 = 0; HH = H; } if H > HH Then HH = H; if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{ if E1 == 0 and C <= HH-PriceScale*B2 Then{ E1 = 1; L1 = L; i1 = index; } if E1 == 1 and index > i1 then{ if L < L1 Then L1 = L; if H >= L1+PriceScale*진입눌림2 Then{ E1 = 2; i1 = index; S1 = L1; } } if loss < 누적패수 and E1 == 2 and index > i1 and C <= S1-PriceScale*진입돌파2 and Tcond == true Then{ sell("s2"); E1 = 0; } }} if MarketPosition== -1 Then{ if IsEntryName("s1") == true Then { SetStopLoss(PriceScale*als,PointStop); SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1); } Else if IsEntryName("s2") == true Then { SetStopLoss(PriceScale*bls,PointStop); SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1); } Else { SetStopLoss(0); SetStopTrailing(0,0); }}
2025-10-31
104
글번호 227548
시스템
답변완료
문의 드립니다.
안녕하세요항상 도움을 주셔서 감사합니다.아래의 서식에서 추가 조건을 부탁드립니다.*추가조건-단순이동평균 200일선(INPUT) 위에 가격이 있을시 매수 만 진입, 아래에 있을 시 매도 만 진입 (매수 진입 x) **최적화를 위해 INPUT에 넣어주세요Input : shortPeriod(5), longPeriod(23), Period(13);input : 손절(350);value1 = MACD(shortPeriod, longPeriod);value2 = ema(value1, Period);# 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); }# 매도/매수청산If CrossDown(value1, value2) Then { Sell(); }SetStopLoss(손절,PointStop);
답변완료
아래의 식을 예스 랭귀지로 변환 좀 부탁드립니다.
✅ 현실형 추세추종 + ADX + 변동성 필터 전략 (예스랭귀지)# ==========================================================
# 📊 현실형 나스닥 60분봉 자동매매 전략
# - 추세장만 진입 (ADX 필터)
# - 저변동 횡보장 회피 (이평 간격 필터)
# - 익절/손절 구간 현실 조정 (당일 평균폭 기준)
# ==========================================================
input : maShort(20), maLong(60), adxPeriod(14);
input : adxThreshold(25), maGapLimit(0.5);
input : StopLossP(150), TakeProfitP(280); # ✅ 현실적 익절·손절 설정 (150~300p)
input : tradeSize(1);
var : adxVal(0), maS(0), maL(0), maGap(0);
var : buyCond(False), sellCond(False), trend(0);
# ---- 지표 계산 ----
maS = Average(Close, maShort);
maL = Average(Close, maLong);
adxVal = ADX(adxPeriod);
maGap = Abs(maS - maL) / maL * 100;
# ---- 추세 판단 ----
if maS > maL then trend = 1;
if maS < maL then trend = -1;
# ---- 매수 조건 ----
if trend = 1 and adxVal > adxThreshold and maGap > maGapLimit and Close > maS then
buyCond = True;
else
buyCond = False;
# ---- 매도 조건 ----
if trend = -1 and adxVal > adxThreshold and maGap > maGapLimit and Close < maS then
sellCond = True;
else
sellCond = False;
# ---- 진입 로직 ----
if MarketPosition = 0 and buyCond then
Buy("L-Entry") next bar at market;
if MarketPosition = 0 and sellCond then
SellShort("S-Entry") next bar at market;
# ---- 청산 조건 ----
SetStopLoss(StopLossP);
SetProfitTarget(TakeProfitP);
# ---- 추가조건: 반전 시 즉시 청산 ----
if MarketPosition = 1 and trend = -1 then
ExitLong("TrendRevL") next bar at market;
if MarketPosition = -1 and trend = 1 then
ExitShort("TrendRevS") next bar at market;
📈 이 설정의 핵심 포인트항목값설명익절 목표280p하루 변동폭 평균의 70~80% 수준손절폭150p1:2 손익비 유지ADX 필터25 이상만 거래횡보장 거래 회피이평간격 제한0.5 이상단기/장기 이평이 붙어있으면 진입X추세 반전 시 강제 청산있음속임수 반전(역배열 돌파 등) 차단
2025-10-31
157
글번호 227531
시스템
답변완료
수식 부탁드립니다.
기준선=(highest(high,26)+lowest(low,26))/2; B=BBandsUp(120,2); x=sum(c*v); z=valuewhen(10,date !=date(10),x(10)); x1=sum(v); z1=valuewhen(10,date !=date(10),x1(10)); K= (x-z)/(x1-z1); wma1 = wavg(C, len); // TEMA 계산 ema1_1 = eavg(wma1, len); ema1_2 = eavg(ema1_1, len); ema1_3 = eavg(ema1_2, len); TEWMA1 = 3 * ema1_1 - 3 * ema1_2 + ema1_3; len2 = len * multi; wma2 = wavg(C, len2); ema2_1 = eavg(wma2, len2); ema2_2 = eavg(ema2_1, len2); ema2_3 = eavg(ema2_2, len2); TEWMA2 = 3 * ema2_1 - 3 * ema2_2 + ema2_3; TEWMA = (TEWMA1 + TEWMA2) / 2; CrossUP(K ,TEWMA) && C>B && C>기준선 설정 len 120 multi 3 종목검색식으로 변환 부탁드립니다. 날이 추워지는데 감기조심하세요. 감사드립니다.
답변완료
안녕하세요 . 키움식을 변환해 주시기를 부탁드립니다.
키움 지표 수식입니다. 부탁드려요.수식1) HMA 상승 A=wavg(2*wavg(scr,len/2) - wavg(scr,len), floor(sqrt(len))); (수식2) HMA 하락 A=wavg(2*wavg(scr,len/2) - wavg(scr,len), floor(sqrt(len))); if(A(1)>A,A,0) (수식3) TEMA 상승 EMA1=eavg(c,50); EMA2=eavg(EMA1,50); EMA3=eavg(EMA2,50); B=3*EMA1-3*EMA2+EMA3; (수식4) TEMA 하락 EMA1=eavg(c,50); EMA2=eavg(EMA1,50); EMA3=eavg(EMA2,50); B=3*EMA1-3*EMA2+EMA3; if(B(1)>B,B,0)
2025-10-30
155
글번호 227518
지표