커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

종목검색식 부탁드림니다.

항상 노고에 감사드림니다.아래의 수식을 종목검색식으로 부탁드림니다.기간 = 20;M = MA(C, 기간);/* ① 최근 10봉 이상 상승 후 하락 전환 → 고정 저항선 */상승 = M > REF(M,1);연속상승 = SUM(상승,10)==10;하락전환 = (M < REF(M,1)) AND (REF(M,1) > REF(M,2));고점조건 = REF(연속상승,1) AND 하락전환;/* ② 변형 저항선 (이전 고점의 M 값 고정) */저항선 = VALUEWHEN(1, 고점조건, REF(M,1));/* ③ 저항선 돌파 조건 */Signal = CROSSUP(C, 저항선);/* ④ 신호 출력 */Signal;
프로필 이미지
존슨비치
2025-11-03
79
글번호 227611
종목검색
답변완료

검색식과 종목검색식 부탁 드립니다

검색식과 종목검색식 부탁 드립니다조건 1 : 최근 5일 (변수 처리)중 최고 거래량의 30%(변수 처리) 이하조건 2 : 최근 5일 (변수 처리) 캔들 중 몸통이 짭은 30%(변수 처리)이하 음봉
프로필 이미지
행복만땅
2025-11-03
69
글번호 227610
종목검색
답변완료

해외선물(나스닥) 섬머타임 타임에 따른 시작시간과 종료시간

해외선물(나스닥)은 서머타임을 실시함에 따라 시작시간과 종료시간이 1시간씩 변경이 됩니다.시스템에 적용시에는 시작시간과 종료시간을 변경하면 되지만, 프리시간과 본장에 사용하는 조건식을 하나로 사용하면 큰 문제점이 없지만 프리시간과 본장을 구분하여 사용(움직이는 흐름이 다르기 때문에 달리 사용)하여 시뮬레이션을 돌리면 거래시점이 시작 시간과 종료 시간이 각 1시간이 차이가 있어 변수값이 달라져 실제 적용시에는 많은 애로점이 있습니다.고로 서머타임 기간에는 서머타임 시간에 맞춰 시뮬레이션 하고 그렇지 않은 때에는 그렇지 않은 시간때에 시뮬레이션이 되도록 하나의 코딩으로 가능토록 코딩을 부탁드려봅니다.제가 본장은 동절기에는 StartTime(211400),EndTime(055623) 서머타임시에는 StartTime(211400),EndTime(055623) 을 사용합니다. 그렇다 보니 적용되지 않은 시간대가 시뮬레이션에 포함됨으로써 변수값을 적용하기가 어렵습니다.이를 해소토록 통함된 코딩을 부탁드립니다.
프로필 이미지
하날랑
2025-11-03
62
글번호 227605
시스템
답변완료

마틴적용 수정 부탁합니다

Input : P(100), MartinMult(2), BaseQty(1);Vars : T(0), Bcond(False), Scond(False), var1(0), var2(0), value3(0), MartinCount(0), LossTrigger(0), PriceStep(PriceScale*5);value3 = MA(C, P);var1 = MA(C, 36);var2 = (Highest(High, 52)[25] + Lowest(Low, 52)[25]) / 2;//------------------------------// 추세 전환시 초기화//------------------------------if CrossUp(C, var1) then begin T = 1; Bcond = False; MartinCount = 0;end;if CrossDown(C, var1) then begin T = -1; Scond = False; MartinCount = 0;end;//------------------------------// 매수 조건//------------------------------if stime >= 093000 and stime < 150000 and T = 1 then begin if L >= var2 + PriceScale*2 then begin if TotalTrades = 0 or (MarketPosition = -1 and BarsSinceEntry >= 130 and BarsSinceExit(1) >= 43) or (TotalTrades >= 1 and MarketPosition = 0 and BarsSinceExit(1) >= 130) then Bcond = True; end; if Bcond and C > value3 then begin Buy("B1") BaseQty contracts at var1 + 0.2 limit; MartinCount = 1; LossTrigger = EntryPrice - PriceStep; // 마틴 기준선 설정 end; // 마틴 진입 if MarketPosition = 1 and MartinCount < 3 then begin if C <= LossTrigger then begin Buy("B-Martin") BaseQty * MartinMult contracts at Market; MartinCount = MartinCount + 1; LossTrigger = EntryPrice - PriceStep; // 다음 회차 기준선 업데이트 end; end;end;//------------------------------// 매도 조건//------------------------------if stime >= 093000 and stime < 150000 and T = -1 then begin if H <= var2 - PriceScale*2 then begin if TotalTrades = 0 or (MarketPosition = 1 and BarsSinceEntry >= 130 and BarsSinceExit(1) >= 43) or (TotalTrades >= 1 and MarketPosition = 0 and BarsSinceExit(1) >= 130) then Scond = True; end; if Scond and C < value3 then begin SellShort("S1") BaseQty contracts at var1 - 0.2 limit; MartinCount = 1; LossTrigger = EntryPrice + PriceStep; end; // 마틴 진입 if MarketPosition = -1 and MartinCount < 3 then begin if C >= LossTrigger then begin SellShort("S-Martin") BaseQty * MartinMult contracts at Market; MartinCount = MartinCount + 1; LossTrigger = EntryPrice + PriceStep; end; end;end;//------------------------------// 청산 시 초기화//------------------------------if MarketPosition = 0 then MartinCount = 0;
프로필 이미지
호시우보
2025-11-03
65
글번호 227601
시스템
답변완료

문의드립니다.

최초 자본 100만원10분봉 매매에서 무포지션시 무조건 70% 매수하고요. 30% 현금이고요. 매수 투자분: 현금 비율이 70:30 되도록 투자비율 리밸런싱을 합니다.투자매수에서 10% 수익이 나면 77:30 비율이 되면 비율이 70: 30 되도록 투지매수 이익분을 처분하고 반대로 투자매수에서 10% 손실이 나면 63:30 비율이 되면 비율이 70: 30 되도록 현금을 투자합니다.수식을 부탁드립니다.
프로필 이미지
종호
2025-11-03
81
글번호 227600
시스템
답변완료

문의드립니다.

1. 직전 거래 "A"2. 직전 거래의 청산 "B"로 이름을 지정하고 A에 의한 진입과 B로 청산시 수익일 경우 "C" , 손실일 경우 "D" 바로 다음 매매 조건을 "D" 즉. 손실일 경우 A의 반대 포지션으로 진입할 경우latestnetryname / latestexitname 그리고 수익과 손실을 어떻게 지정해야 하나요 ?
프로필 이미지
chunsk
2025-11-03
60
글번호 227599
시스템
답변완료

문의드립니다

안녕하세요 ? 아래수식이 에러가 있는데 도움주세요 감사드립니다 Inputs: length(5), FilterBars(2);Vars: lastHiVal_1m(0), lastLoVal_1m(0), sig1_Buy(False), sig1_Sell(False), last1mBuyBar(0), last1mSellBar(0), xOpen_1m(0), xClose_1m(0), Condition1_1m(False), Condition2_1m(False), lastHiVal_2m(0), lastLoVal_2m(0), sig2_Buy(False), sig2_Sell(False), xOpen_2m(0), xClose_2m(0), Condition1_2m(False), Condition2_2m(False), barCount(0), LastAlertBar(0), FilterBuyCond(False), FilterSellCond(False);sig1_Buy = False;sig1_Sell = False;Condition1_1m = (High = Highest(High, length)) and (lastHiVal_1m <> High);Condition2_1m = (Low = Lowest(Low, length)) and (lastLoVal_1m <> Low);If Condition1_1m Then Begin lastHiVal_1m = High;End;If Condition2_1m Then Begin lastLoVal_1m = Low;End;If xOpen_1m = 0 Then Begin xOpen_1m = Open;End;xClose_1m = (Open + High + Low + Close) / 4;xOpen_1m = (xOpen_1m + xClose_1m) / 2;If (xOpen_1m <> xOpen_1m) or (xClose_1m <> xClose_1m) Then Begin xOpen_1m = Open; xClose_1m = Close;End;If Condition2_1m and (xClose_1m > xOpen_1m) Then Begin sig1_Buy = True; last1mBuyBar = CurrentBar; End;If Condition1_1m and (xClose_1m < xOpen_1m) Then Begin sig1_Sell = True; last1mSellBar = CurrentBar;End;barCount = barCount + 1;If barCount >= 2 Then Begin Condition1_2m = (High = Highest(High, length)) and (lastHiVal_2m <> High); Condition2_2m = (Low = Lowest(Low, length)) and (lastLoVal_2m <> Low); If Condition1_2m Then Begin lastHiVal_2m = High; End; If Condition2_2m Then Begin lastLoVal_2m = Low; End; If xOpen_2m = 0 Then Begin xOpen_2m = Open; End; xClose_2m = (Open + High + Low + Close) / 4; xOpen_2m = (xOpen_2m + xClose_2m) / 2; If (xOpen_2m <> xOpen_2m) or (xClose_2m <> xClose_2m) Then Begin xOpen_2m = Open; xClose_2m = Close; End; sig2_Buy = Condition2_2m and (xClose_2m > xOpen_2m); sig2_Sell = Condition1_2m and (xClose_2m < xOpen_2m); barCount = 0;End;FilterBuyCond = (CurrentBar - last1mBuyBar) <= FilterBars;FilterSellCond = (CurrentBar - last1mSellBar) <= FilterBars;If sig2_Buy and FilterBuyCond Then Begin If LastAlertBar <> CurrentBar Then Begin Buy Next Bar at Market; LastAlertBar = CurrentBar; End;End;If sig2_Sell and FilterSellCond Then Begin If LastAlertBar <> CurrentBar Then Begin Sell Short Next Bar at Market; LastAlertBar = CurrentBar; End;End;
프로필 이미지
새벽에
2025-11-03
76
글번호 227598
시스템
답변완료

검색식 부탁드립니다

주가가 1봉전 종가 아래로 하락해던 종목 매수 금지 검색 부탁 드립니다
프로필 이미지
님이랑
2025-11-03
70
글번호 227595
종목검색

소드노 님에 의해서 삭제되었습니다.

프로필 이미지
소드노
2025-11-03
3
글번호 227588
시스템
답변완료

조건검색 문의

//@version=5indicator("Swing Pivots High Low with Breakout", "Swing Pivots High Low with Breakout", overlay=true, max_labels_count=500)tf = input.timeframe(title="Timeframe", defval="")gr="LENGTH LEFT / RIGHT"leftLenH = input.int(title="Pivot High", defval=5, minval=1, inline="Pivot High",group=gr)rightLenH = input.int(title="/", defval=5, minval=1, inline="Pivot High",group=gr)colorH = input(title="", defval=color.red, inline="Pivot High",group=gr)leftLenL = input.int(title="Pivot Low", defval=5, minval=1, inline="Pivot Low", group=gr)rightLenL = input.int(title="/", defval=5, minval=1, inline="Pivot Low",group=gr)colorL = input(title="", defval=color.blue, inline="Pivot Low",group=gr)// 피봇 하이 돌파 신호 설정breakoutColor = input(color.green, "Breakout Signal Color")pivotHigh(ll, rl) => maxLen = 1000 float ph = ta.pivothigh(ll, rl) int offset = 0 while offset < maxLen if not na(ph[offset]) break offset := offset + 1 ph[offset]pivotLow(ll, rl) => maxLen = 1000 float pl = ta.pivotlow(ll, rl) int offset = 0 while offset < maxLen if not na(pl[offset]) break offset := offset + 1 pl[offset]ph = request.security(syminfo.tickerid, tf, pivotHigh(leftLenH, rightLenH), barmerge.gaps_off, barmerge.lookahead_on)pl = request.security(syminfo.tickerid, tf, pivotLow(leftLenL, rightLenL), barmerge.gaps_off, barmerge.lookahead_on) drawLabel(_offset, _pivot, _style, _color) => if not na(_pivot) label.new(bar_index[_offset], _pivot, str.tostring(_pivot, format.mintick), style=_style, color=_color, textcolor=#131722)// 피봇 하이 돌파 신호 감지pivotHighBreakout = ta.crossover(close, ph)if (timeframe.period == tf or tf == "") drawLabel(rightLenH, ta.pivothigh(leftLenH, rightLenH), label.style_label_down, colorH) drawLabel(rightLenL, ta.pivotlow(leftLenL, rightLenL), label.style_label_up, colorL)plotshape(ph, "PH", style=shape.circle, location=location.absolute, color=colorH)plotshape(pl, "PL", style=shape.circle, location=location.absolute, color=colorL)// 피봇 하이 돌파 신호 표시 (작은 사이즈로 고정)plotshape(pivotHighBreakout, "Pivot High Breakout", style=shape.triangleup, location=location.belowbar, color=breakoutColor, size=size.tiny)alertcondition(ta.crossover(close, ph), "PH Crossover", "Price crossed over current pivot high")alertcondition(ta.crossunder(close, ph), "PH Crossunder", "Price crossed under current pivot high")alertcondition(ta.crossover(close, pl), "PL Crossover", "Price crossed over current pivot low")alertcondition(ta.crossunder(close, pl), "PL Crossunder", "Price crossed under current pivot low")일봉상 위 신호가 나오는 종목에 대해서 검출할 수 있도록 해주시면 감사드리겠습니다 (__)
프로필 이미지
사공하늘
2025-11-03
86
글번호 227587
검색