시작시간 15시30분. 끝나는 시간 다음날 오전 05시 50분. 진입한 상품이 있다면 모두청산후 시스템 완전종료.
이평 1 이 이평 2 아래의 있고
스토캐스틱 퍼스트 50 아래의 있고
알에스아이 50상향돌파 첫번째 매도. 45상향돌파 두번째 매도.
진입한 종목 한 개당,
익절160틱. 손절 120틱.
수고하세요.
답변 1
예스스탁
예스스탁 답변
2022-05-12 13:39:33
안녕하세요
예스스탁입니다.
input : StartTime(153000),EndTime(055000);
input : P1(5),P2(20),sto1(10),sto2(5),rsip(10);
Input : 익절틱수(160),손절틱수(120);
var : Tcond(false),mav1(0),mav2(0),stok(0),rsiv(0),t(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);
stok = StochasticsK(sto1,sto2);
rsiv = rsi(rsip);
if tcond ==true then
{
if mav1 < mav2 and stok > 50 Then
{
if Crossup(rsiv,50) Then
{
Sell("s1");
}
if CrossUp(rsiv,45) Then
{
Sell("s2");
}
}
}
SetStopProfittarget(익절틱수*PriceScale,PointStop);
SetStopLoss(손절틱수*PriceScale,PointStop);
즐거운 하루되세요
> 아침 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 시작시간 15시30분. 끝나는 시간 다음날 오전 05시 50분. 진입한 상품이 있다면 모두청산후 시스템 완전종료.
이평 1 이 이평 2 아래의 있고
스토캐스틱 퍼스트 50 아래의 있고
알에스아이 50상향돌파 첫번째 매도. 45상향돌파 두번째 매도.
진입한 종목 한 개당,
익절160틱. 손절 120틱.
수고하세요.