커뮤니티

시스템매매 관련 문의합니다..^^*

프로필 이미지
서민순
2025-12-01 23:54:56
19
글번호 228548
답변완료

**아래시스템 매매에서 해당매매종목에 원하는 가격대를 돌파할때 진입이 되는 수식 요청드립니다....      예를 들어 삼성전자를 11만원 돌파시 진입 매수 일때 11만원 가격을 정해놓으면 매수진입한다는 의미 입니다...      이러한 조건을  변수로 지정해 주시면 감사하겠습니다...      =================================================================================== input : 시작일(20250702),갭상승(2),P(20),하락per(1),분할(20); input : starttime(91500),EndTime(151500); Var : value(0),mav(0); var : Tcond(False); input : 최소수익(10),수익감소(3); var : bh(0),sl(0); //매수진입 후 20%이상 수익후 최고가에서 5%이상 하락하면 청산 if MarketPosition == 1 Then { bh = highest(H,BarsSinceEntry); if bh >= EntryPrice*(1+최소수익/100) Then ExitLong("bx",AtStop,bh*(1-수익감소/100)); } //매도진입 후 20%이상 수익후 최저가에서 5%이상 상승하면 청산 if MarketPosition == -1 Then { sl = lowest(L,BarsSinceEntry); if sl <= EntryPrice*(1-최소수익/100) Then ExitShort("sx",AtStop,sl*(1+수익감소/100)); } if Bdate != Bdate[1] Then tcond = False; if (sdate != sDate[1] and sTime >= starttime) or (sdate == sDate[1] and sTime >= starttime and sTime[1] < starttime) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; Var1=rsi(32); mav = ma(c,p); value = 0; if sDate >= 시작일 and DayOpen <= DayClose(1)*(1+갭상승/100) and Tcond == true Then { # 매수 / 매도청산 If CCI(9) > 0 Then value = 1; If MACD(12,26) > 0 Then value = value+1; If DIPlus(14) > DIMinus(14) Then value = value+1; If StochasticsK(12,5) > StochasticsD(12,5,5) Then value = value+1; # 매수/매도청산 If value >= 3 and mav > mav[1] Then { Buy("b1"); } value = 0; if MarketPosition == 1 and MaxEntries < 분할 OR MarketPosition <= 0 and value >= 3 and mav > mav[1] Then { Buy("b2",AtStop,EntryPrice(0)*(1-(하락per*MaxEntries)/100)); } if rsi(14)<32 Then buy("b3"); if CrossUp(c,DayOpen)Then Buy("v1"); if CrossUp(c,DayOpen)Then Buy("v2"); if CrossUp(c,DayOpen)Then Buy("v3"); if CrossUp(c,DayOpen)Then Buy("v4"); } # 매도/매수청산 If CCI(9) < 0 Then value = 1; If MACD(12,26) < 0 Then value = value+1; If DIPlus(14) < DIMinus(14) Then value = value+1; If StochasticsK(12,5) < StochasticsD(12,5,5) Then value = value+1; If value >= 3 Then { SetStopProfittarget(15, PercentStop); }

시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-02 13:17:50

안녕하세요 예스스탁입니다. input : 시작일(20250702),갭상승(2),P(20),하락per(1),분할(20); input : starttime(91500),EndTime(151500); input : 최소수익(10),수익감소(3); input : 진입가격(110000); Var : value(0),mav(0); var : Tcond(False); var : bh(0),sl(0); //매수진입 후 20%이상 수익후 최고가에서 5%이상 하락하면 청산 if MarketPosition == 1 Then { bh = highest(H,BarsSinceEntry); if bh >= EntryPrice*(1+최소수익/100) Then ExitLong("bx",AtStop,bh*(1-수익감소/100)); } //매도진입 후 20%이상 수익후 최저가에서 5%이상 상승하면 청산 if MarketPosition == -1 Then { sl = lowest(L,BarsSinceEntry); if sl <= EntryPrice*(1-최소수익/100) Then ExitShort("sx",AtStop,sl*(1+수익감소/100)); } if Bdate != Bdate[1] Then tcond = False; if (sdate != sDate[1] and sTime >= starttime) or (sdate == sDate[1] and sTime >= starttime and sTime[1] < starttime) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; Var1=rsi(32); mav = ma(c,p); value = 0; if sDate >= 시작일 and DayOpen <= DayClose(1)*(1+갭상승/100) and Tcond == true Then { # 매수 / 매도청산 If CCI(9) > 0 Then value = 1; If MACD(12,26) > 0 Then value = value+1; If DIPlus(14) > DIMinus(14) Then value = value+1; If StochasticsK(12,5) > StochasticsD(12,5,5) Then value = value+1; # 매수/매도청산 If value >= 3 and mav > mav[1] Then { Buy("b1"); } value = 0; if MarketPosition == 1 and MaxEntries < 분할 OR MarketPosition <= 0 and value >= 3 and mav > mav[1] Then { Buy("b2",AtStop,EntryPrice(0)*(1-(하락per*MaxEntries)/100)); } if rsi(14)<32 Then buy("b3"); if CrossUp(c,DayOpen)Then Buy("v1"); if CrossUp(c,DayOpen)Then Buy("v2"); if CrossUp(c,DayOpen)Then Buy("v3"); if CrossUp(c,DayOpen)Then Buy("v4"); } # 매도/매수청산 If CCI(9) < 0 Then value = 1; If MACD(12,26) < 0 Then value = value+1; If DIPlus(14) < DIMinus(14) Then value = value+1; If StochasticsK(12,5) < StochasticsD(12,5,5) Then value = value+1; If value >= 3 Then { SetStopProfittarget(15, PercentStop); } if MarketPosition == 0 and H < 진입가격 Then Buy("b",AtStop,진입가격); 즐거운 하루되세요