시작시간.07시.끝나는 시간.05시 50분.진입한 상품이 있다면 모두청산 후,시스템완전종료.
알에스아이 시그널선40하향돌파가 출현되고
알에스아이 시그널선55상향돌파 매수.
매수 이 후,40틱 마이너스 날 때 1개씩분할매수.
씨씨아이 -100 하향돌파 매수청산.
한계약당누적수익.40틱.
한계약당누적수익 3회 달성되면 시간과 관계없이 시스템완전종료.
수고하세요.
답변 1
예스스탁
예스스탁 답변
2023-08-03 11:07:00
안녕하세요
예스스탁입니다.
input : StartTime(80000),EndTime(55000);
Input : 횟수(3),익절틱수(40);
var : Tcond(False),Xcount(0);
Input : RSIPeriod(9),RSIsignal(10);
var : RSIV(0),RSIS(0),t(0),ll(0);
RSIV = RSI(RSIPeriod);
RSIS = ma(RSIV,RSIsignal);
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;
Xcount = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if TotalTrades > TotalTrades[1] Then
{
if IsExitName("bx",1) == true Then
{
Xcount = Xcount+1;
if Xcount == 횟수 Then
ExitLong("bx");
}
}
if CrossUp(RSIS,55) Then
{
t = 1;
}
if CrossDown(RSIS,55) Then
{
t = -1;
ll = rsis;
}
if t == -1 Then
{
if rsis < ll Then
ll = rsis;
}
if Tcond == true and Xcount < 횟수 Then
{
if MarketPosition <= 0 and t == 1 and t != t[1] and ll[1] < 40 then
Buy();
if MarketPosition == 1 Then
{
Buy("b",AtLimit,LatestEntryPrice(0)-PriceScale*40);
ExitLong("bp",AtLimit,AvgEntryPrice+PriceScale*익절틱수);
}
}
즐거운 하루되세요
> 아침 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 시작시간.07시.끝나는 시간.05시 50분.진입한 상품이 있다면 모두청산 후,시스템완전종료.
알에스아이 시그널선40하향돌파가 출현되고
알에스아이 시그널선55상향돌파 매수.
매수 이 후,40틱 마이너스 날 때 1개씩분할매수.
씨씨아이 -100 하향돌파 매수청산.
한계약당누적수익.40틱.
한계약당누적수익 3회 달성되면 시간과 관계없이 시스템완전종료.
수고하세요.