커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

문의 드립니다.~~~~

수고하십니다 추세선식을 포함하는 시스템식 부탁드립니다 - 상승추세선은 장시작후 저점대비 a틱이상 상승했을시에 빨간색으로 생성 (상승추세선의 고저차이가 a틱이상이어야 함) a틱이상 상승후 b틱이상 하락시에 상승추세선 완성되고 고점형성 추세선으로 생긴 각각의 고점과 저점의 가격과 그차이값을 챠트에 표기 - 하락추세선은 장시작후 고점대비 a틱이상 하락했을시에 파란색으로 생성 (하락추세선의 고저차이가 a틱이상이어야 함) a틱이상 하락후 b틱이상 상승시에 하락추세선 완성되고 저점형성 추세선으로 생긴 각각의 고점과 저점가격과 그차이값을 챠트에 표기 - 이후 상승 또는 하락추세선은 위의 조건에 따라 반복 생성 - 매도진입 추세선으로 인해 만들어진 직전고점을 돌파하여 직전고점에서 부터 직전상승추세선의 고점저점차이값 만큼 상승도달시 1계약 매도 - 매도 물타기 1차진입지점에서 직전상승추세선의 고점저점차이값 만큼 상승도달시 2계약 추가매도 - 매도청산 익절은 1계약 매도시는 하락하여 직전고점에 도달시 익절청산 물타기후 총 3계약 매도시는 첫진입가에 도달시 전부 익절청산 손절은 매수진입발생시 전부 청산과 동시에 1계약 매수스위칭진입 - 매수진입 추세선으로 인해 만들어진 직전저점을 돌파하여 직전저점에서 부터 직전하락추세선의 고점저점차이값 만큼 하락도달시 1계약 매수 - 매수 물타기 1차진입지점에서 직전하락추세선의 고점저점차이값 만큼 하락도달시 2계약 추가매수 - 매수청산 익절은 1계약 매수시는 상승하여 직전저점에 도달시 익절청산 물타기후 총 3계약 매수시는 첫진입가에 도달시 전부 익절청산 손절은 매도진입발생시 전부 청산과 동시에 1계약 매도스위칭진입
프로필 이미지
예스요
2023-02-11
853
글번호 166201
시스템
답변완료

수식 문의 드립니다.

제목 : 수식 문의 드립니다. > 매입: 20 이평선 상향시 매입 매도: 1) 매입가 대비 5% 상승시 즉시 매도 2) 매입가 대비 매입가를 5% 하향시 즉시 매도 3) 매입가 대비 매입가를 하향시 즉시 매도 4) 1봉전 종가 대비 6% 하향시 즉시매도
프로필 이미지
기관장
2023-02-12
896
글번호 166200
시스템
답변완료

추세선 쓰리반등

input : Period(120); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0), date21(0),date22(0),time21(0),time22(0),txx(0), vTL(0), vTL9(0),txxx(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Array:r[7](0),fr[7](0),TL2[7](0),TL3[7](0),TX2[7](0),TX3[7](0); var : tx99(0),tx99count(0),l1(0),l2(0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; for j = 0 to 6 { fr[j] = LoVal[1] + ((HiVal[0] - LoVal[1]) * r[j]); } Condition1 = False; tx99count = 0; Text_Delete(tx99); Condition99 = False; } Else { If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; date22 = date[0]; time22 = stime[0]; Text_Delete(tx); Condition1 = False; Condition99 = False; } Else { if Condition1 == False and Value12 <= value11-0.5 and c >= value12+PriceScale*2 and value12 <= DayHigh-0.9 Then { Condition1 = true; txx = Text_New_Self(sdate,sTime,H-PriceScale*4,"●"); Text_SetStyle(txx,2,2); Text_SetColor(txx,Magenta); Text_SetSize(txx,20); } if Condition99 == False and C >= value12+PriceScale*2 and value12 <= value11-0.5 and value12 <= DayHigh-0.9 Then { l1 = value12; l2 = l1[1]; Condition99 = true; tx99count = tx99count+1; if tx99count >= 2 Then { Text_Delete(txx); txx = Text_New_Self(sdate,sTime,H-PriceScale*4,"●"); Text_SetStyle(txx,2,2); if abs(l1-l2) < PriceScale*3 Then Text_SetColor(txx,Black); Else Text_SetColor(txx,Magenta); Text_SetSize(txx,20); } } } } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; for j = 0 to 5 { fr[j] = LoVal[0] + ((HiVal[1] - LoVal[0]) * r[j]); } } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; date32 = date[0]; time32 = stime[0]; } } 추세선 0.5p 아래에서 2틱 이상 반등 나오면 동그라미 생기는 수식인데 여기에 추가로, 세 저점이 5틱 이내에서 쓰리반등이면 동그라미 표시. 쓰리반등 수식을 현 수식보다 맨 위쪽에 먼저 별도로 작성하여, 동그라미를 같은 위치에 약간 크게하면 현재의 동그라미보다 먼저 표시되어 뒤쪽에서 쌍반등과 겹쳐 보이게 표시. 큰 접시 위에 작은 접시 올려놓은 모양. 감사합니다.
프로필 이미지
고성
2023-02-11
778
글번호 166199
지표

whdmsxow 님에 의해서 삭제되었습니다.

프로필 이미지
whdmsxow
2023-02-10
42
글번호 166198
사용자 함수
답변완료

수식 수정부탁드립니다

80700번에 대한 요청수식을 받은것인데 수정요망합니다 /*5이평포복돌파매수신호*/ input : 표시가격(L/1.05); input : 출현횟수(5), 전일종가대비상승율(1.03), 당일시가대비상승율(1.03); var : T(0), S(0); var1 = ma(C,5); if CrossUp(C,var1) Then T = 1; if CrossDown(C,var1) Then { T = -1; if C < O Then T = -2; } if T == -2 Then { S = S+1; if S >= 출현횟수 and C > O Then { T = -3; if C >= DayClose[1]*전일종가대비상승율 or C >= DayOpen*당일시가대비상승율 Then Plot1(표시가격,"5이평포복돌파매수신호"); } } 제가 요청드린것은 5이평선을 음봉으로 데드크로스를 발생한 시점부터 5회이상 연속적으로 종가상으로 5이평선 밑에서 있다가 일정상승율로 양봉이 발생할때에 매수신호를 표시하고자 하는 것임(5이평선아래 음봉이던 양봉이던 상관없이 종가상으로 5이평선보다 낮으면 되며, 각 캔들은 연속적으로 5이평선보다 낮아야 한다는 것이며, 그러다가 3%이상의 상승율로 양봉이 발생하면 매수신호를 주는 것임. 또한 이 양봉은 5이평선보다 낮아도 되고 돌파하는 양봉이어도 상관없음 상기 수식으로 검증을 해보면 5연속하지않았는데도 매수신호가 출현하고 있네요
프로필 이미지
해피오
2023-02-10
954
글번호 166192
검색
답변완료

수정 의뢰드립니다

안녕하세요! 아래 첨부 파일은 지난번에 만들어 주셔서 현재 잘 사용하고 있습니다! 만들어주신 파일을 매매에 도움을 받고자 수정을 좀 요청 드립니다! 항상 노고에 감사드립니다! <수정 요청 사항> 콜과 풋교차 차트에서 콜이나 풋이 2.5 가격선에서 봉이 완성되었을때 첨부파일 처럼 강세 약세가 나타나는 수식을 부탁드립니다! 예> 콜이 2.5 가격선에서 완성봉이 되면 강세 (붉은 바탕) 풋이 2.5 가격선에서 완성봉이 되면 약세 (파랑 바탕) * 혹시 2.5 가격선에서 완성봉이 되지 않고 터치만 되어 꼬리가 만들어진 상황에서도 강세 약세가 만들어질 수 있는지요? 만약 강세 약세가 만들어 질 수 있다면 수식에 같이 추가하고 싶습니다. #선물차트: Data1 #콜풋 교차차트: Data2~data3 #콜풋 교차차트: Data4~data5 #콜풋 교차차트: Data6~data7 #콜풋 교차차트: Data8~data9 #콜풋 교차차트: Data10~data11 #콜풋 교차차트: Data12~data13 #콜풋 교차차트: Data14~data15 #콜풋 교차차트: Data16~data17 -------------------------------------------------------- input : Period(14); Input : af(0.02), maxAF(0.2); var : DP(0),DM(0),sarv(0); DP = DiPlus(Period); DM = DiMinus(Period); sarv = SAR(af,maxAF); if dp > dm and C > sarv Then { plot1(99999999,"라인1"); plot2(0,"라인2"); } else if dp < dm and C < sarv Then { plot1(0,"라인1"); plot2(99999999,"라인2"); } Else { Plot1(0); plot2(0); }
프로필 이미지
qha71
2023-02-10
984
글번호 166175
지표
답변완료

함수요청

안녕하세요? 국내선물 5분봉으로 일중거래를 하고자 합니다. 아래의 전략에 대해 스크립트 작성 요청드립니다. 20ma가 당일의 시가선을 돌파든 이탈이든 크로스를 했을 당시 그 크로스 시점의 주가가 더 크면 완성 익봉 시가 매수진입 20ma가 당일의 시가선을 돌파든 이탈이든 크로스를 했을 당시 그 크로스 시점의 주가가 더 작으면 매도진입 진입횟수는 n번으로 제어하되 15시 20분에는 강제청산하고자 합니다.
프로필 이미지
흰둥이아빠
2023-02-10
1172
글번호 166171
시스템
답변완료

수식 수정부탁드립니다

Input : Period(12), Period1(5), Period2(5); Input : 기준선1(15), 기준선2(25), 기준선3(30), 기준선4(75), 기준선5(80); Input : 고저기간(12), 변곡기간(3); var : StoK(0),StoD(0),StoKH(0),StoKL(0); StoK = StochasticsK(Period,Period1); StoD = StochasticsD(Period,Period1,Period2); StoKH = Highest(StoK,고저기간); StoKL = Lowest(StoK,고저기간); Plot1(StoK, "StoK"); Plot2(StoD, "StoD"); var : AA(False),BB(False),DH1(0),DL1(0); AA = StoK[2]<=StoK[1] && StoK[1]>StoK; //고점변곡 BB = StoK[2]>=StoK[1] && StoK[1]<StoK; //저점변곡 #상승후 하락전환시의 최근<변곡기간>중의 최고 StoK if AA == true then { DH1 = StoK[1]; #표시라인값 } #하락후 상승전환시의 최근<변곡기간>중의 최저 StoK if BB == true Then { DL1 = StoK[1]; #표시라인값 } if DH1 > 0 Then Plot3(DH1,"변곡고가선"); if DL1 > 0 Then Plot4(DL1,"변곡저가선"); 상기 수식으로 지표설정을 해보면 PLOT3과 4의 라인이 제대로 설정이 안되는데 어디에서 수식을 수정해야할까요? 즉 StoK의 변곡저점과 변곡고점마다 라인이 표시되어야하는데 대부분은 표시가 되는데요 어떤 변곡점에는 라인이 제대로 표시가 되지않은데 수정을 부탁드립니다
프로필 이미지
해피오
2023-02-10
904
글번호 166170
지표
답변완료

재문의드립니다.

1. 아래 2번에 만들어 주신 수식을 적용해 보면 3시 31분에 매수가 나가고 매도로 더 이상 진행이 되지 않았습니다. 그리고 같은 봉에서도 현재가가 수시로 변할 때 매수 매도가 변환되도록 부탁드립니다, 같은 봉에서는 매매가 3개 정도만 되도록 수행하도록 고쳐 주시면 나머지 추가 수정른 제가 수정해서 붙여 놓갰습니다. 2. 두번째 문의는 위의 수식은 특정 가격 기준으로 위 아래로 매수 매도가 반복되는 것인데요. 특정가격 기준으로 하락시 매도만 하고 다시 상승시 전에는 매수로 전환 했는데 전처럼 매수로 전환하지 않고 그냥 매도 청산만 하고 싶습니다. 즉 하락 배팅에만 올인하는 수식을 하나더 부탁드립니다. 안녕하세요 예스스탁입니다. 1 올리신 식은 시가에서 5틱 상승하면 매수 시가에서 5틱 하락하면 매도 봉완성시 다음봉 시가 청산입니다. 동일 내용이 반복해서 쓰여진 이유는 수식에서 하나의 Buy나 sell은 한봉에 한번만 동작합니다. 한봉에서 여러번 시가+5틱과 시가-5틱을 왔다 갓다 반복할때 여러번 진입하기 위해 동일내용을 여러번 작성해 나열한 것입니다. 2 input : ndate(20220209),ntime(90000); input : Price(324.00),ntick(5);; var1 = Price + PriceScale*ntick; var2 = Price - PriceScale*ntick; if sDate >= ndate and sTime > ntime Then Condition1 = true; if Condition1 == true Then { if H < var1 Then Buy("b",AtStop,var1); if L > var2 Then Sell("s",AtStop,var2); } 즐거운 하루되세요 > 종호 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래수식을 보아도 코딩 지식이 없어서 어떻게 매수 매도 되는 원리인지 해석을 할 수가 없네요. 식들이 어떤 의미로 매수가 되고 청산되며 다시 매도되고 청산되는 지를 알고 싶습니다. 그리고 제가 원하는 수식은 특정 날자와 시간과 특정 가격을 input 으로 하고요. 어떤 특정 가격 A 를 input 으로 임의로 정해주고 특정 날자와 시간 이후에 기다리고 있다가 아래나 위에 있던 현재가 상승 또는 하락하여 A 가격에 도달하면 비로서 매수 매도가 활성화 되어서 그 가격 A + PriceScale*5 을 현재가가 한번 위로 터치하면 매수하고 계속 위로 올라가면 놓아두고 다시 아래로 떨어져서 A - PriceScale*5 를 터치하면 매수청산과 더불어서 히방으로 1계약 매도합니다. 이런 식으로 계속 반복합니다. 현재가가 A + PriceScale*5 위로 도달시 매수 1게약 현재가가 A - PriceScale*5 아래로 도달시 매도 1게약 을 반복하는 것입니다. 아래 수식처럼 비슷하게 하면 ATSTOP 함수를 써서 가능할 것 같은데요. 아래 수식에서 ExitLong("bx",AtMarket); 이 왜 수식으로 게속 와야 하는 지 등를 모르겠어요. 제가 원하는 수식도 마저 부탁드립니다. 늘 수고하심에 감사드립니다. if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx3",AtMarket); if NextBarOpen != C Then { Buy("b4",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx4",AtMarket); if NextBarOpen != C Then { Buy("b5",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx5",AtMarket); if NextBarOpen == C Then { Buy("b6",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx6",AtMarket); if NextBarOpen == C Then { Buy("b7",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx7",AtMarket); if NextBarOpen == C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx8",AtMarket); if NextBarOpen == C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx9",AtMarket); if NextBarOpen == C Then { Buy("b10",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx10",AtMarket); if NextBarOpen == C Then { Buy("b11",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx11",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen != C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx2",AtMarket); if NextBarOpen != C Then { Sell("s3",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx3",AtMarket); if NextBarOpen != C Then { Sell("s4",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx4",AtMarket); if NextBarOpen != C Then { Sell("s5",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx5",AtMarket); if NextBarOpen == C Then { Sell("s6",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx6",AtMarket); if NextBarOpen == C Then { Sell("s7",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx7",AtMarket); if NextBarOpen == C Then { Sell("s8",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx8",AtMarket); if NextBarOpen == C Then { Sell("s9",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx9",AtMarket); if NextBarOpen == C Then { Sell("s10",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx10",AtMarket); if NextBarOpen == C Then { Sell("s11",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx11",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b12",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx12",AtMarket); if NextBarOpen != C Then { Buy("b13",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx13",AtMarket); if NextBarOpen != C Then { Buy("b14",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx14",AtMarket); if NextBarOpen != C Then { Buy("b15",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx15",AtMarket); if NextBarOpen != C Then { Buy("b16",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx16",AtMarket); if NextBarOpen != C Then { Buy("b17",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx17",AtMarket); if NextBarOpen == C Then { Buy("b18",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx18",AtMarket); if NextBarOpen == C Then { Buy("b19",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx19",AtMarket); if NextBarOpen == C Then { Buy("b20",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx20",AtMarket); if NextBarOpen == C Then { Buy("b21",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx21",AtMarket); if NextBarOpen == C Then { Buy("b22",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx22",AtMarket); if NextBarOpen == C Then { Buy("b23",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s12",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx12",AtMarket); if NextBarOpen != C Then { Sell("s13",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx13",AtMarket); if NextBarOpen != C Then { Sell("s14",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx14",AtMarket); if NextBarOpen != C Then { Sell("s15",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx15",AtMarket); if NextBarOpen != C Then { Sell("s16",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx16",AtMarket); if NextBarOpen != C Then { Sell("s17",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx17",AtMarket); if NextBarOpen == C Then { Sell("s18",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx18",AtMarket); if NextBarOpen == C Then { Sell("s19",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx19",AtMarket); if NextBarOpen == C Then { Sell("s20",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx20",AtMarket); if NextBarOpen == C Then { Sell("s21",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx21",AtMarket); if NextBarOpen == C Then { Sell("s22",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx22",AtMarket); if NextBarOpen == C Then { Sell("s23",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx23",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b24",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx24",AtMarket); if NextBarOpen != C Then { Buy("b25",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx25",AtMarket); if NextBarOpen != C Then { Buy("b26",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx26",AtMarket); if NextBarOpen != C Then { Buy("b27",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx27",AtMarket); if NextBarOpen != C Then { Buy("b28",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx28",AtMarket); if NextBarOpen != C Then { Buy("b29",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx29",AtMarket); if NextBarOpen == C Then { Buy("b30",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx30",AtMarket); if NextBarOpen == C Then { Buy("b31",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx31",AtMarket); if NextBarOpen == C Then { Buy("b32",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx32",AtMarket); if NextBarOpen == C Then { Buy("b33",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx33",AtMarket); if NextBarOpen == C Then { Buy("b34",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx34",AtMarket); if NextBarOpen == C Then { Buy("b35",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx35",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s24",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx24",AtMarket); if NextBarOpen != C Then { Sell("s25",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx25",AtMarket); if NextBarOpen != C Then { Sell("s26",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx26",AtMarket); if NextBarOpen != C Then { Sell("s27",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx27",AtMarket); if NextBarOpen != C Then { Sell("s28",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx28",AtMarket); if NextBarOpen != C Then { Sell("s29",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx29",AtMarket); if NextBarOpen == C Then { Sell("s30",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx30",AtMarket); if NextBarOpen == C Then { Sell("s31",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx31",AtMarket); if NextBarOpen == C Then { Sell("s32",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx32",AtMarket); if NextBarOpen == C Then { Sell("s33",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx33",AtMarket); if NextBarOpen == C Then { Sell("s34",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx34",AtMarket); if NextBarOpen == C Then { Sell("s35",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx35",AtMarket);
프로필 이미지
종호
2023-02-10
895
글번호 166167
시스템
답변완료

문의 드립니다.

1. 해외선물 전일잔고를 08시01분에 청산하는 수식어를 부탁드립니다. 2. input : starttime(180000),endtime(40000),n(30); var : Tcond(false),hh(0),h1(0),ll(0),l1(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) 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 Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { input : 익절틱수(0),손절틱수(0); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*5); } } ExitLong("bx",AtMarket); if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*5); } ExitLong("bx1",AtMarket); if NextBarSdate != sDate Then { if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*5); } } ExitShort("sx",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*5); } ExitShort("sx1",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); } 1번 수식어를 2번에 넣을수있는지요. 미리 감사드립니다.
프로필 이미지
푸른
2023-02-10
689
글번호 166166
시스템