커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수정문의 드립니다~

Input : 당일수익틱수(21),당일손실틱수(100); input : t5(5),p13(13),p5(5); var : j(0),n(0),d(0),kt(0),kts(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if sdate != sdate[1] Then SetStopEndofday(050000); if Bdate != Bdate[1] Then { SetStopEndofday(0); Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; } j = c-c[t5]; n = ema(ema(j,p13),p5); d = ema(ema(abs(j),p13),p5); kt = 100*n/d; kts = ema(kt,6); if Xcond == false and crossup(kt,60) Then buy(); if Xcond == false and crossup(kt,-60) Then buy(); if Xcond == false and CrossDown(kt,60) Then sell(); if Xcond == false and CrossDown(kt,-60) Then sell(); if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } hts 접속하고 전략실행 후 첫 신호 진입 이후부터 조건이 성립되게 수식을 수정할 수 있을까요? 그리고 +60 하향 돌파 시 매도 진입하고 물량이 청산 안되었을 때 -60을 다시 하향 돌파하니 추가로 물량이 매도가 되는데 물량 보유시 추가 매도 되지 않게, 반대로도 -60 상향 돌파 시 매수 진입하고 물량이 청산 안되었을 때 +60을 다시 상향 돌파하면 추가로 매수 되지 않게 수정 부탁드립니다~ 그리고 전략실행 시작하고 첫 신호나오면 매매수량을 1개로 했는데 2개씩 진입이돼서 스위칭때 자동으로 물량 청산되버는데.. 첫 신호에 1계약만 들어가게 하려면 피라미딩 설정할 때 진입 신호로 설정을 했다가 진입하고 나서 모든신호 진입으로 변경을 해야하나요? 첫 진입 때 1계약만 들어갈 수 있게 알려주세요 감사합니다.
프로필 이미지
사즉생
2020-01-14
118
글번호 135140
시스템
답변완료

함수요청

안녕하세요? 아래 글번호 65633번 재질문입니다. 작성주신 스크립트를 한투에 적용해보면 HSIF20 3분봉상 1월 13일 10:24분봉의 저가가 볼린저밴드 상단 위에 위치하였으나 매도신호가 생성되지 않습니다. =================================================================================== 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2),매매횟수(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBmd = ma(C,BBP); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 매매횟수 and L > bbup Then sell("s",AtMarket); if entry < 매매횟수 and H < bbdn Then buy("b",AtMarket); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx",AtMarket); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx",AtMarket); } SetStopEndofday(170000);
프로필 이미지
흰둥이아빠
2020-01-14
130
글번호 135137
시스템
답변완료

수식부탁드립니다.

안녕하세요? 아래&#47504; 수식을 골드크로스가 발생될때 상승률이 3%이내인 종목을 검색하려는 수식 부탁드립니다. 골드크로스 발생된후 상승률은 상관없습니다. 감사합니다. Inputs: ShortPeriod(5),LongPeriod(20); Variables: Fval(0),FvalFast(0),FvalSlow(0); Fval = ((Close - Close[1]) * Volume) ; FvalFast = Ema(Fval, ShortPeriod); FvalSlow = Ema(Fval, LongPeriod); IF crossup(fvalfast,FvalSlow) Then FIND(1);
프로필 이미지
천년대로
2020-01-14
106
글번호 135136
종목검색
답변완료

문의

청산이후라는 조건만 삭제하고 싶습니다. 즉, 무포지션일 때 당일고가나 저가갱신 시 진입하는 수식입니다. ******************************************************************************* if MarketPosition == 0 and #현재 무포지션이고 countif(DayHigh(0) != DayHigh(0)[1],BarsSinceExit(1)) >= 고가갱신수 Then #청산이후 당일고가 갱신이 n회이상 있었으면 buy("b2"); if MarketPosition == 0 and #현재 무포지션이고 countif(DayLow(0) != DayLow(0)[1],BarsSinceExit(1)) >= 저가갱신수 Then #청산이후 당일저가 갱신이 n회이상 있었으면 sell("s2");
프로필 이미지
좌오비우오비
2020-01-14
113
글번호 135130
시스템
답변완료

수식추가 부탁드립니다.

안녕하세요? 아래의 2가지 시스템 모두 하루매매횟수를 외부변수로 할수있게 부탁드립니다. 감사합니다. 1 input : P1(5),P2(20); input : 매수음봉길이틱수(2),매수양봉길이틱수(2); input : 매도양봉길이틱수(2),매도음봉길이틱수(2); input : 익절틱수(50),손절틱수(50); var1 = ma(C,P1); var2 = ma(C,P2); if MarketPosition == 0 and countif(var1<var2,2) == 2 and C[1] == O[1]-매수음봉길이틱수*PriceScale and C[0] == O[0]+매수양봉길이틱수*PriceScale and C[0] == O[1] Then buy(); if MarketPosition == 0 and countif(var1>var2,2) == 2 and C[1] == O[1]+매도양봉길이틱수*PriceScale and C[0] == O[0]-매도음봉길이틱수*PriceScale and O[0] == C[1] Then sell(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : P1(5),P2(20); input : 매수양봉길이틱수(2); input : 매도음봉길이틱수(2); input : 익절틱수(50),손절틱수(50); var1 = ma(C,P1); var2 = ma(C,P2); if MarketPosition == 0 and countif(var1<var2 and C == O+매수양봉길이틱수*PriceScale,3) == 3 and C[0] == C[1]+PriceScale*1 and C[1] == C[2]+PriceScale*1 Then buy(); if MarketPosition == 0 and countif(var1>var2 and C == O-매도음봉길이틱수*PriceScale,3) == 3 and C[0] == C[1]-PriceScale*1 and C[1] == C[2]-PriceScale*1 Then sell();
프로필 이미지
대구어린울프
2020-01-14
104
글번호 135127
시스템
답변완료

65627 재 질문이요~

65627 재 질문 드립니다~^^
프로필 이미지
뽄때
2020-01-14
102
글번호 135126
시스템

불타는토끼 님에 의해서 삭제되었습니다.

프로필 이미지
불타는토끼
2020-01-13
7
글번호 135121
지표
답변완료

부탁드립니다.

var : TL1(0), TL2(0); if stime == 090000 and BarInterval <> 1 then { TL1 = TL_New(sdate, stime, 0, sdate, stime,999999999); TL2 = TL_New_self(sdate, stime, -999999, sdate, stime,999999); TL_SetColor(TL1, RGB(180,182,182)); TL_SetColor(TL2, RGB(180,182,182)); } var1 = (dayHigh-dayClose(1))/dayClose(1)*100; var2 = (C - dayClose(1))/dayClose(1)*100; var3 = (dayLow-dayClose(1))/dayClose(1)*100; if C >= dayClose(1) then { plot1(var2,"몸통",red); Else { plot1(var2,"몸통",blue); 위수식을 빨강매수 파랑 매도 화살표로 부탁드립니다.
프로필 이미지
뚜벅뚜벅
2020-01-13
165
글번호 135120
시스템
답변완료

수식 문의

수식 문의 : 아래 수식의 MACD osc 에 대한 당일 평균 이평선을 구하고 싶습니다. Input : shortPeriod(12), longPeriod(26), Period(9); Var : MACDv(0), MACDsig(0),macdosc(0) ; MACDv = MACD(shortPeriod, longPeriod); MACDsig = ema(MACDv,Period); macdosc = MACDv-ema(MACDv,Period);
프로필 이미지
부똘이
2020-01-13
179
글번호 135105
지표
답변완료

함수요청

안녕하세요? 아래 스크립트 검증 부탁드립니다. (전략과 컨셉이 상이하다면 새롭게 작성 요청드립니다.) 전략은 다음과 같습니다. 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 3 and L > bbup Then sell("s"); if entry < 3 and H < bbdn Then buy("b"); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx"); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx"); } SetStopEndofday(170000);
프로필 이미지
흰둥이아빠
2020-01-13
157
글번호 135101
시스템