커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 부탁드립니다.

5일전~당일 중 최고가를 당일 오후3시 15분에 넘어 있다면 매수
프로필 이미지
기심필득
2021-04-01
732
글번호 147614
시스템
답변완료

수식 질문드립니다.

오버 시스템 만들려고합니다. 아래식으로는 잘 안되네요 오후 15:00: ~ 15:30 까지만 조건 판단하여 진입하려고합니다. 부탁드리겠습니다. 감사합니다 !! -------------------- input : StartTime(152000),EndTime(153000); var : Tcond(false,Data1); 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 Tcond == true Then . . . .
프로필 이미지
캣피쉬
2021-04-01
869
글번호 147613
시스템
답변완료

수식어 부탁 드립니다

input : StartTime(080000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(xtime); 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; SetStopEndofday(0); } INPUT : LENGTH(60); VAR : upv(0), dnv(0); upv = HIGHEST(HIGH, LENGTH); dnv = LOWEST(LOW, LENGTH); if MarketPosition <= 0 and L > dnv Then Buy("b",AtLimit,dnv); if MarketPosition >= 0 and H < upv Then sell("s",AtLimit,upv); ---------------------------------- input : StartTime(140000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false),S1(0),D1(0),TM(0); if sDate != sDate[1] then SetStopEndofday(xtime); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } 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; SetStopEndofday(0); } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; } 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; 선행스팬1 = (전환선[25]+기준선[25])/2; 선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2; var1 = Disparity(60); Var2 = ma(C,300); if Tcond == true Then { if 전환선 > 기준선 and crossup(전환선,선행스팬1) and var1 >= 99 Then buy("b"); if MarketPosition == 1 then { if 전환선 < 기준선 and CrossDown(전환선,선행스팬2) and var1 >= 99 Then exitlong("bx1"); if TM <= TM[BarsSinceEntry]+30 and CountIf(CrossUp(c,Var2),BarsSinceEntry) >= 1 Then ExitLong("bx2",AtStop,EntryPrice); if CrossDown(c,Var2) Then ExitLong("bx3"); } if 전환선 < 기준선 and CrossDown(전환선,선행스팬1) and var1 <= 100 Then sell("s"); if MarketPosition == -1 then { if 전환선 > 기준선 and CrossUp(전환선,선행스팬2) and var1 <= 100 Then ExitShort("sx1"); if TM <= TM[BarsSinceEntry]+30 and CountIf(CrossDown(c,Var2),BarsSinceEntry) >= 1 Then ExitShort("sx2",AtStop,EntryPrice); if CrossUp(c,Var2) Then ExitShort("sx3"); } } =========================================== 위 2종류의 수식어를 결합하여 시스템을 부탁드립니다. 첫번째 수식어의 매매시간은 08시부터 오후 15시까지이며 청산시간은 15시 10분으로 수정해주시고 두번째 수식어의 매매시간은 15시50분 부터 익일 05시 50분까지이며 청산시간은 05시 55분으로 수정 부탁드립니다. 미리 감사 합니다.
프로필 이미지
푸른
2021-04-01
857
글번호 147612
시스템
답변완료

수식 문의

var1 = ma(C,5); var2 = ma(C,20); 기준으로 피라미딩 모든진입허용 / 진입횟수 10으로 하여 순차적으로 전봉 진입보다 현봉진입이 높을때(매도), 낮을때(매수) 진입 전량 청산하고 반대방향으로 순차적으로 진입하는 수식이 가능한지요? 가능하다면 부탁드립니다.
프로필 이미지
유로만
2021-04-01
905
글번호 147609
시스템
답변완료

부탁드립니다.

도움에 감사 드립니다. 수식1)은 Low와 high값이 10개 수식2)은 Low와 high값이 20개 수식3)은 Low와 high값이 30개를 이용한 값을 구하고 있지만 Low와 high값을 10~300개(외부변수n을 이용하여)를 이용한 값을 구하고 싶습니다. "for cnt = 1 to n"문과 같은 예와같이 간단히 줄여 작성이 가능하지요? 수식1) var:a(0),b(0); a=100*(10-(( IFf(l ==lowest(l,11),0, IFf(l[1]==lowest(l,11),1, IFf(l[2]==lowest(l,11),2, IFf(l[3]==lowest(l,11),3, IFf(l[4]==lowest(l,11),4, IFf(l[5]==lowest(l,11),5, IFf(l[6]==lowest(l,11),6, IFf(l[7]==lowest(l,11),7, IFf(l[8]==lowest(l,11),8, IFf(l[9]==lowest(l,11),9,10)))))))))))))/10; b=100*(10-(( IFf(h ==highest(h,11),0, IFf(h[1]==highest(h,11),1, IFf(h[2]==highest(h,11),2, IFf(h[3]==highest(h,11),3, IFf(h[4]==highest(h,11),4, IFf(h[5]==highest(h,11),5, IFf(h[6]==highest(h,11),6, IFf(h[7]==highest(h,11),7, IFf(h[8]==highest(h,11),8, IFf(h[9]==highest(h,11),9,10)))))))))))))/10; var1=b-a Plot1(var1); 수식2) var:a(0),b(0); a=100*(20-(( IFf(l ==lowest(l,21),0, IFf(l[1]==lowest(l,21),1, IFf(l[2]==lowest(l,21),2, IFf(l[3]==lowest(l,21),3, IFf(l[4]==lowest(l,21),4, IFf(l[5]==lowest(l,21),5, IFf(l[6]==lowest(l,21),6, IFf(l[7]==lowest(l,21),7, IFf(l[8]==lowest(l,21),8, IFf(l[9]==lowest(l,21),9, IFf(l[10]==lowest(l,21),10, IFf(l[11]==lowest(l,21),11, IFf(l[12]==lowest(l,21),12, IFf(l[13]==lowest(l,21),13, IFf(l[14]==lowest(l,21),14, IFf(l[15]==lowest(l,21),15, IFf(l[16]==lowest(l,21),16, IFf(l[17]==lowest(l,21),17, IFf(l[18]==lowest(l,21),18, IFf(l[19]==lowest(l,21),19,20))))) ))))) ))))) ))))) )))/20; b=100*(20-(( IFf(h ==highest(h,21),0, IFf(h[1]==highest(h,21),1, IFf(h[2]==highest(h,21),2, IFf(h[3]==highest(h,21),3, IFf(h[4]==highest(h,21),4, IFf(h[5]==highest(h,21),5, IFf(h[6]==highest(h,21),6, IFf(h[7]==highest(h,21),7, IFf(h[8]==highest(h,21),8, IFf(h[9]==highest(h,21),9, IFf(h[10]==highest(h,21),10, IFf(h[11]==highest(h,21),11, IFf(h[12]==highest(h,21),12, IFf(h[13]==highest(h,21),13, IFf(h[14]==highest(h,21),14, IFf(h[15]==highest(h,21),15, IFf(h[16]==highest(h,21),16, IFf(h[17]==highest(h,21),17, IFf(h[18]==highest(h,21),18, IFf(h[19]==highest(h,21),19,20))))) ))))) ))))) ))))) )))/20; var1=b-a Plot1(var1); 수식3) var:a(0),b(0); a=100*(30-(( IFf(l ==lowest(l,31),0, IFf(l[1]==lowest(l,31),1, IFf(l[2]==lowest(l,31),2, IFf(l[3]==lowest(l,31),3, IFf(l[4]==lowest(l,31),4, IFf(l[5]==lowest(l,31),5, IFf(l[6]==lowest(l,31),6, IFf(l[7]==lowest(l,31),7, IFf(l[8]==lowest(l,31),8, IFf(l[9]==lowest(l,31),9, IFf(l[10]==lowest(l,31),10, IFf(l[11]==lowest(l,31),11, IFf(l[12]==lowest(l,31),12, IFf(l[13]==lowest(l,31),13, IFf(l[14]==lowest(l,31),14, IFf(l[15]==lowest(l,31),15, IFf(l[16]==lowest(l,31),16, IFf(l[17]==lowest(l,31),17, IFf(l[18]==lowest(l,31),18, IFf(l[19]==lowest(l,31),19, IFf(l[20]==lowest(l,31),20, IFf(l[21]==lowest(l,31),21, IFf(l[22]==lowest(l,31),22, IFf(l[23]==lowest(l,31),23, IFf(l[24]==lowest(l,31),24, IFf(l[25]==lowest(l,31),25, IFf(l[26]==lowest(l,31),26, IFf(l[27]==lowest(l,31),27, IFf(l[28]==lowest(l,31),28, IFf(l[29]==lowest(l,31),29, 30))))) )))) )))))) ))))) ))))) ))))) )))/30; b=100*(30-(( IFf(h ==highest(h,31),0, IFf(h[1]==highest(h,31),1, IFf(h[2]==highest(h,31),2, IFf(h[3]==highest(h,31),3, IFf(h[4]==highest(h,31),4, IFf(h[5]==highest(h,31),5, IFf(h[6]==highest(h,31),6, IFf(h[7]==highest(h,31),7, IFf(h[8]==highest(h,31),8, IFf(h[9]==highest(h,31),9, IFf(h[10]==highest(h,31),10, IFf(h[11]==highest(h,31),11, IFf(h[12]==highest(h,31),12, IFf(h[13]==highest(h,31),13, IFf(h[14]==highest(h,31),14, IFf(h[15]==highest(h,31),15, IFf(h[16]==highest(h,31),16, IFf(h[17]==highest(h,31),17, IFf(h[18]==highest(h,31),18, IFf(h[19]==highest(h,31),19, IFf(h[20]==highest(h,31),20, IFf(h[21]==highest(h,31),21, IFf(h[22]==highest(h,31),22, IFf(h[23]==highest(h,31),23, IFf(h[24]==highest(h,31),24, IFf(h[25]==highest(h,31),25, IFf(h[26]==highest(h,31),26, IFf(h[27]==highest(h,31),27, IFf(h[28]==highest(h,31),28, IFf(h[29]==highest(h,31),29, 30))))) )))) )))))) ))))) ))))) ))))) )))/30; var1=b-a Plot1(var1);
프로필 이미지
yes
2021-04-01
914
글번호 147608
지표
답변완료

수식어 부탁드립니다

input : StartTime(080000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(xtime); 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; SetStopEndofday(0); } INPUT : LENGTH(60); VAR : upv(0), dnv(0); upv = HIGHEST(HIGH, LENGTH); dnv = LOWEST(LOW, LENGTH); if MarketPosition <= 0 and L > dnv Then Buy("b",AtLimit,dnv); if MarketPosition >= 0 and H < upv Then sell("s",AtLimit,upv); ---------------------------------- input : StartTime(160000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); if sDate != sDate[1] then SetStopEndofday(xtime); 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; SetStopEndofday(0); } 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; 선행스팬1 = (전환선[25]+기준선[25])/2; 선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2; var1 = Disparity(60); if Tcond == true Then { if 전환선 > 기준선 and crossup(전환선,선행스팬1) and var1 >= 99 Then buy("b"); if MarketPosition == 1 then { if 전환선 < 기준선 and CrossDown(전환선,선행스팬2) and var1 >= 99 Then exitlong(); } if 전환선 < 기준선 and CrossDown(전환선,선행스팬1) and var1 <= 100 Then sell("s"); if MarketPosition == -1 then { if 전환선 > 기준선 and CrossUp(전환선,선행스팬2) and var1 <= 100 Then ExitShort(); } } =========================================== 위 2종류의 수식어를 결합하여 시스템을 부탁드립니다. 첫번째 수식어의 매매시간은 08시부터 오후 15시까지이며 청산시간은 15시 10분으로 수정해주시고 두번째 수식어의 매매시간은 15시50분 부터 익일 05시 50분까지이며 청산시간은 05시 55분으로 수정 부탁드립니다. 미리 감사 합니다.
프로필 이미지
푸른
2021-04-01
810
글번호 147606
시스템
답변완료

문의 드립니다.

1. 음봉진행 하다가 양봉 발생 시 매수 진입 / 음봉 발생 시 매도 청산완료 2. 양봉진행 하다가 음봉 발생 시 매도 진입 / 양봉 발생 시 매수 청산완료 상승추세에서 1번을 적용하고 2번은 하락추세에서 적용하려고 하오니 각각 분리해서 따로 부탁드립니다. 감사합니다.
프로필 이미지
선물대장
2021-04-01
898
글번호 147601
시스템
답변완료

수식 수정 요청부탁드립니다.

안녕하세요. 저번에 작성해주신 수식 참고가 많이 되었습니다. 고맙습니다. 추가로 수정 좀 부탁드립니다. < 수정 요청 사항 > 아래에 답변해주신 수식에서 1. 손실발생시 진입수량을 최대 8개까지만으로 해주시면 고맙겠습니다. (1-2-4-8) 2. 익절 포인트를 0.0011, 손절 포인트는 0.001로 해주시면 고맙겠습니다. ======================================================= 안녕하세요 예스스탁입니다. 1 익절시 동시에 동일방향 진입이 가능하지 않습니다. 시스템은 청산과 동일시점에 같은 방향의 진입신호가 발생하면 다시 해당 진입도 청산됩니다.일절이 발생하면 다음봉 시가에 진입하게 작성해 드립니다. 2 해외선물의 경우 시초가 진입이 어렵습니다. 첫진입은 첫봉의 종가에 진입하게 작성해 드립니다. 3 if sDate != sDate[1] Then SetStopEndofday(53000); if Bdate != Bdate[1] Then { SetStopEndofday(0); Buy("b1",AtMarket,DEF,1); } Else { if MarketPosition == 0 and IsExitName("StopProfittarget",1) == true Then { if MarketPosition(1) == 1 Then Buy("b",AtMarket); if MarketPosition(1) == -1 Then Sell("s",AtMarket); } } if MarketPosition == 1 Then { Sell("bs",AtStop,EntryPrice-0.001,CurrentContracts*2); } if MarketPosition == -1 Then { Buy("sb",AtStop,EntryPrice+0.001,CurrentContracts*2); } SetStopProfittarget(0.001,PointStop); 즐거운 하루되세요 > 바다가좋아 님이 쓴 글입니다. > 제목 : 수식 문의드립니다. > 안녕하세요. 수식 좀 만들어주시면 고맙겠습니다. 1. 적용환경 : 해외선물 (Australian Dollar 기준) 2. 매매 조건 1) 장 시초가 1계약 매수 2) 매수됨과 동시에 익절(0.001 pt), 손절(0.001 pt) 설정 3. 수익발생시 1) 익절시에는 매수청산 후 1계약 매수진입 반복 4. 손해 발생시 1) 1차 손절시에는 매수청산 후 2계약 매도진입 2) 2차 손절시에는 매도청산 후 4계약 매수진입 3) 3차 손절시에는 매수청산 후 8계약 매도진입 5. 손해 발생후 익절이 되면 다시 그 방향으로 1계약 매수 or 매도 진입 위 사항을 반복하는 시스템을 만들어주시면 고맙겠습니다. 그럼 수고하세요.
프로필 이미지
바다가좋아
2021-04-01
914
글번호 147600
시스템
답변완료

시스템 수식 부탁드립니다

불철주야 수고 많으십니다. 틱 챠트 사용하고 있습니다. 3분봉 시가가 기준선과 같거나 위에 있을때 5일선이 아래에서 위로 통과할때 매수. 3분봉 시가가 기준선과 같거나 아래에 있을때 5일선이 위에서 아래로 통과할 때 매도. 이상입니다.
프로필 이미지
라몬
2021-04-01
963
글번호 147598
시스템
답변완료

일봉,분봉관련없이 "n개봉"에서의 최대거래량 고가와 저가 지표

수고가 많으십니다. 항상 감사합니다. 일봉,분봉관련없이 "n개봉"에서의 최대거래량 고가와 저가 지표를 plot으로 나타내고 싶습니다. 감사합니다.
프로필 이미지
챠트미소
2021-04-01
1179
글번호 147597
지표