커뮤니티
시스템매매 관련 문의합니다..^^*
아래수식에 보시면 시작일이 25년7월2일 설정이 되어있는데,
추가적인 사항으로 한시간단위로는 설정이 가능한지요^^*
한시간단위도 설정가능하면 변수로 지정해 주시면 고맙겠습니다..
항상 감사드립니다...
input : 시작일(20250702),갭상승(2),P(20),하락per(1),분할(20);
input : starttime(91500),EndTime(151500);
Var : value(0),mav(0);
var : Tcond(False);
if Bdate != Bdate[1] 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 (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
Var1=rsi(14);
mav = ma(c,p);
value = 0;
if sDate >= 시작일 and DayOpen <= DayClose(1)*(1+갭상승/100) and Tcond == true Then
{
# 매수 / 매도청산
If CCI(9) > 0 Then
value = 1;
If MACD(12,26) > 0 Then
value = value+1;
If DIPlus(14) > DIMinus(14) Then
value = value+1;
If StochasticsK(12,5) > StochasticsD(12,5,5) Then
value = value+1;
# 매수/매도청산
If value >= 3 and mav > mav[1] Then
{
Buy("b1");
}
value = 0;
if MarketPosition == 1 and MaxEntries < 분할 OR MarketPosition <= 0 and value >= 3 and mav > mav[1] Then
{
Buy("b2",AtStop,EntryPrice(0)*(1-(하락per*MaxEntries)/100));
}
if rsi(14)<32 Then
buy("b3");
}
# 매도/매수청산
If CCI(9) < 0 Then
value = 1;
If MACD(12,26) < 0 Then
value = value+1;
If DIPlus(14) < DIMinus(14) Then
value = value+1;
If StochasticsK(12,5) < StochasticsD(12,5,5) Then
value = value+1;
If value >= 3 Then
{
SetStopProfittarget(7, PercentStop);
}
답변 1
예스스탁 예스스탁 답변
2025-11-10 15:01:03