시작시간 15시 30분. 끝나는 시간 05시 50분. 진입한 수량이 있다면 모두 청산후 시스템종료.
이평 1 이 이평 2 위의 있고
알에스아이 55 하향돌파 첫번째 매수. 50하향돌파 두번째 매수. 45하향돌파 세번째 매수.
이평 1이 이평 2 아래의 있고
알에스아이 45 상향돌파 첫번째 매도. 50상향돌파 두번째 매도. 55상향돌파 세번째 매도.
익절 400틱.
수고하세요.
답변 1
예스스탁
예스스탁 답변
2022-05-23 13:03:04
안녕하세요
예스스탁입니다.
input : StartTime(153000),EndTime(055000);
input : P1(5),P2(20),rsip(10);
Input : 익절틱수(400);
var : Tcond(false),mav1(0),mav2(0),rsiv(0),t(0),Xcount(0);
IF Endtime > starttime Then
setStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
mav1 = ma(C,P1);
mav2 = ma(C,P2);
rsiv = rsi(rsip);
if tcond == true Then
{
if mav1 > mav2 Then
{
if MarketPosition <= 0 and CrossDown(rsiv,55) Then
Buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and CrossDown(rsiv,50) Then
Buy("b2");
if MarketPosition == 1 and MaxEntries == 2 and CrossDown(rsiv,45) Then
Buy("b3");
}
if mav1 < mav2 Then
{
if MarketPosition >= 0 and CrossUp(rsiv,45) Then
Sell("s1");
if MarketPosition == -1 and MaxEntries == 1 and CrossUp(rsiv,50) Then
Sell("s2");
if MarketPosition == -1 and MaxEntries == 2 and CrossUp(rsiv,55) Then
Sell("s3");
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
즐거운 하루되세요
> 아침 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 시작시간 15시 30분. 끝나는 시간 05시 50분. 진입한 수량이 있다면 모두 청산후 시스템종료.
이평 1 이 이평 2 위의 있고
알에스아이 55 하향돌파 첫번째 매수. 50하향돌파 두번째 매수. 45하향돌파 세번째 매수.
이평 1이 이평 2 아래의 있고
알에스아이 45 상향돌파 첫번째 매도. 50상향돌파 두번째 매도. 55상향돌파 세번째 매도.
익절 400틱.
수고하세요.