커뮤니티

문의드립니다.

프로필 이미지
jesten77
2021-11-18 07:56:52
656
글번호 153675
답변완료
항상 감사드립니다. 아래 수식에 2가지 추가 부탁 드립니다. 1. 신호나온 종가에 n틱 이상 반대로 조정 받은 후 진입하는 수식 첨가 부탁드립니다. 2. 현재캔들에서 이전 N번째 캔들들의 최고가 돌파와 최저가 돌파시 매수 매도가 아닌 N번째 캔들 고가 돌파시 종가에 매수, 저가 돌파시 종가에 매도 수식 부탁드립니다. bx,cx는 매수는 n번째 캔들 저가 돌파시, 매도는 n번째 캔들 고가 돌파시로 해주세요. input : n1(5); input : StartTime(233000),EndTime(013000); input : 익절틱수(80),손절틱수(0),거래횟수(3); var : Tcond(false), T(0), entry(0); Array : H1[50](0),L1[50](0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { T = 0; Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true Then { if H > Highest(H,n1)[1] and C > O and entry < 거래횟수 Then Buy("b"); if L < Lowest(L,N1)[1] and C < O and entry < 거래횟수 Then Sell("s"); if MarketPosition == 1 Then ExitLong("bx",AtStop,L[BarsSinceEntry]-PriceScale*1); if MarketPosition == -1 Then ExitShort("sx",AtStop,H[BarsSinceEntry]+PriceScale*1); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-11-18 09:35:03

안녕하세요 예스스탁입니다. input : n1(5),n(3); input : StartTime(233000),EndTime(013000); input : 익절틱수(80),손절틱수(0),거래횟수(3); var : Tcond(false),entry(0),T(0),S(0),Y(0); Array : H1[50](0),L1[50](0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { T = 0; Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true Then { if T <= 0 and H > Highest(H,n1)[1] and C > O Then { T = 1; S = C; Y = S; } if T >= 0 and L < Lowest(L,N1)[1] and C < O Then { T = -1; S = C; Y = S; } if T == 1 Then { if C < Y Then Y = c; if Y <= S-PriceScale*n and CrossUp(C,S) and entry < 거래횟수 Then { T = 2; Buy("b"); } } if T == -1 Then { if C > Y Then Y = c; if Y >= S+PriceScale*n and CrossDown(C,S) and entry < 거래횟수 Then { T = -2; Sell("s"); } } if MarketPosition == 1 Then ExitLong("bx",AtStop,L[BarsSinceEntry]-PriceScale*1); if MarketPosition == -1 Then ExitShort("sx",AtStop,H[BarsSinceEntry]+PriceScale*1); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > jesten77 님이 쓴 글입니다. > 제목 : 문의드립니다. > 항상 감사드립니다. 아래 수식에 2가지 추가 부탁 드립니다. 1. 신호나온 종가에 n틱 이상 반대로 조정 받은 후 진입하는 수식 첨가 부탁드립니다. 2. 현재캔들에서 이전 N번째 캔들들의 최고가 돌파와 최저가 돌파시 매수 매도가 아닌 N번째 캔들 고가 돌파시 종가에 매수, 저가 돌파시 종가에 매도 수식 부탁드립니다. bx,cx는 매수는 n번째 캔들 저가 돌파시, 매도는 n번째 캔들 고가 돌파시로 해주세요. input : n1(5); input : StartTime(233000),EndTime(013000); input : 익절틱수(80),손절틱수(0),거래횟수(3); var : Tcond(false), T(0), entry(0); Array : H1[50](0),L1[50](0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { T = 0; Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true Then { if H > Highest(H,n1)[1] and C > O and entry < 거래횟수 Then Buy("b"); if L < Lowest(L,N1)[1] and C < O and entry < 거래횟수 Then Sell("s"); if MarketPosition == 1 Then ExitLong("bx",AtStop,L[BarsSinceEntry]-PriceScale*1); if MarketPosition == -1 Then ExitShort("sx",AtStop,H[BarsSinceEntry]+PriceScale*1); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);