예스스탁
예스스탁 답변
2022-05-16 09:26:20
안녕하세요
예스스탁입니다.
input : StartTime(93000),EndTime(055000);
input : P1(5),P2(20),sto1(10),sto2(5),rsip(10);
Input : 횟수(3),익절틱수(160),손절틱수(160);
var : Tcond(false),mav1(0),mav2(0),stok(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;
Xcount = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if TotalTrades > TotalTrades[1] then
{
if IsExitName("StopProfittarget",1) == true then
Xcount = Xcount+1;
}
mav1 = ma(C,P1);
mav2 = ma(C,P2);
stok = StochasticsK(sto1,sto2);
rsiv = rsi(rsip);
if tcond ==true and Xcount < 횟수 Then
{
if mav1 > mav2 and stok > 60 Then
{
if CrossDown(rsiv,50) Then
Buy();
if CrossDown(c,mav2) Then
Buy();
}
if mav1 < mav2 and stok < 40 Then
{
if CrossUp(rsiv,50) Then
Sell();
if CrossUp(c,mav2) Then
Sell();
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 아침 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 시작시간 09시30분. 끝나는 시간 다음날 오전 05시 50분. 진입한 상품이 있다면 모두청산후 시스템 완전종료.
이평 1 이 이평 2 위의 있고
스토캐스틱 퍼스트 60 위의 있고
알에스아이 50하향돌파 매수. 주가가 이평 2를 하향돌파 매수.
이평 1 이 이평 2 아래의 있고
스토캐스틱 퍼스트 40 아래의 있고
알에스아이 50상향돌파 매도. 캔들이 이평 2를 상향돌파 매도.
익절160틱. 손절160틱.
손절 횟수와 상관없이 누적수익과도 상관없이
익절 3회 하면 시간과 관계없이 시스템 완전종료.
수고하세요.