예스스탁
예스스탁 답변
2024-09-20 13:53:14
안녕하세요
예스스탁입니다.
# KOSPI 선물 10분봉
input: tt(150000);
var: chkP(3), reChkP(20), stopChk(10);
var: HH(0), LL(0), BS(0), SS(0),entry(0);
var: dayChk(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if BarIndex == 0 then ClearDebug();
if dayindex == chkP then
{
HH = Highest(Max(C,O), chkP+1);
LL = Lowest(Min(C,O), chkP+1);
#if date == 20240612 then messageLog("--HH %.2f, LL: %.2f", HH, LL);
}
#if High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then messageLog("HH %.2f, High: %.2f", HH, High);
if DayIndex >= chkP
# and Time < 95000
and sDate == NextBarSdate
and EntryDate(0) < Date
and EntryDate(1) < Date
and entry < 1
and sTime < 120000
and abs(DayOpen-DayClose(1)) < 3
Then {
Buy("B1", AtStop, HH);
Sell("S1", AtStop, LL);
}
//if dayChk == 0 and High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then {
// messageLog("HH %.2f, High: %.2f", HH, High);
// dayChk = 1;
//}
if ExitDate(1) == Date
and Time < 150000
and entry < 1
and sTime < 120000
and abs(DayOpen-DayClose(1)) < 3
// and LatestEntryName(1) != "B2"
// and LatestEntryName(1) != "S2"
// and LatestEntryName(0) != "B2"
// and LatestEntryName(0) != "S2"
Then {
if DayIndex < reChkP Then {
HH = Highest(Max(C,O), DayIndex+1);
LL = Lowest(Min(C,O), DayIndex+1);
}
Else {
HH = Highest(Max(C,O), reChkP);
LL = Lowest(Min(C,O), reChkP);
}
Buy("B2", AtStop, HH);
Sell("S2", AtStop, LL);
}
if (MarketPosition == 1) Then {
if DayIndex < stopChk Then {
BS = Lowest(Min(C,O), DayIndex+1);
}
Else {
BS = Lowest(Min(C,O), stopChk);
}
ExitLong("EL", AtStop, BS);
}
if (MarketPosition == -1) Then {
if DayIndex < stopChk Then {
SS = Highest(Max(C,O), DayIndex+1);
}
Else {
SS = Highest(Max(C,O), stopChk);
}
#messageLog(" SS %.2f", SS);
ExitShort("ES", AtStop, SS);
}
SetStopEndofday(1530);
즐거운 하루되세요
> 가자아이 님이 쓴 글입니다.
> 제목 : 서식 부탁드립니다.
> 본 서식에서 추가 서식 부탁드립니다.
# KOSPI 선물 10분봉
input: tt(150000);
var: chkP(3), reChkP(20), stopChk(10);
var: HH(0), LL(0), BS(0), SS(0);
var: dayChk(0);
if BarIndex == 0 then ClearDebug();
if dayindex == chkP then {
HH = Highest(Max(C,O), chkP+1);
LL = Lowest(Min(C,O), chkP+1);
#if date == 20240612 then messageLog("--HH %.2f, LL: %.2f", HH, LL);
}
#if High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then messageLog("HH %.2f, High: %.2f", HH, High);
if DayIndex >= chkP
# and Time < 95000
and sDate == NextBarSdate
and EntryDate(0) < Date
and EntryDate(1) < Date
Then {
Buy("B1", AtStop, HH);
Sell("S1", AtStop, LL);
}
//if dayChk == 0 and High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then {
// messageLog("HH %.2f, High: %.2f", HH, High);
// dayChk = 1;
//}
if ExitDate(1) == Date
and Time < 150000
// and LatestEntryName(1) != "B2"
// and LatestEntryName(1) != "S2"
// and LatestEntryName(0) != "B2"
// and LatestEntryName(0) != "S2"
Then {
if DayIndex < reChkP Then {
HH = Highest(Max(C,O), DayIndex+1);
LL = Lowest(Min(C,O), DayIndex+1);
}
Else {
HH = Highest(Max(C,O), reChkP);
LL = Lowest(Min(C,O), reChkP);
}
Buy("B2", AtStop, HH);
Sell("S2", AtStop, LL);
}
if (MarketPosition == 1) Then {
if DayIndex < stopChk Then {
BS = Lowest(Min(C,O), DayIndex+1);
}
Else {
BS = Lowest(Min(C,O), stopChk);
}
ExitLong("EL", AtStop, BS);
}
if (MarketPosition == -1) Then {
if DayIndex < stopChk Then {
SS = Highest(Max(C,O), DayIndex+1);
}
Else {
SS = Highest(Max(C,O), stopChk);
}
#messageLog(" SS %.2f", SS);
ExitShort("ES", AtStop, SS);
}
SetStopEndofday(1530);
1. 하루에 한번만 진입
2. 오전 12시까지만 진입
3. 전날 종가대비 3pt 이상 갭 상승(하락)시 진입 금지
*각 공히 당일 청산입니다.
위의 3가지 경우의 서식을 각각 부탁드립니다.
바쁘시더라도 부탁드리겠습니다.
감사합니다.