커뮤니티
경과봉 적용 시점
두번째 진입에서 경과봉을 필터로 사용하고 있습니다.
경과봉 적용할 때 시간을 넣어서 필터로 사용하고 싶습니다.
기존 수식
input : 경과봉(0),b2(70),진입눌림2(18),진입돌파2(6);
요청수식
input : 경과봉적용시작(120000), 경과봉적용해제(140000),경과봉(0),b2(70),진입눌림2(18),진입돌파2(6);
위 내용대로 작동되도록 수식 추가 부탁드립니다.
항상 고맙습니다.
*****************************************************************************************************************************
input : 최대(999999),최소(700);
input : 진입시간(084500),진입제한시간(144500);
input : 거래횟수(50);
input : b1(95),진입눌림1(28),진입돌파1(0);
input : 경과봉(0),b2(70),진입눌림2(18),진입돌파2(6);
var : T1(0),entry(0),LL(0),EH(0),E1(0),H1(0),i1(0),S1(0),L1(0),V1(0);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then{
T1 = TotalTrades;
E1 = 0;
LL = L;
}
if stime >= 진입시간 then{
if L < LL Then
LL = L;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 Then{
if E1 == 0 and C >= LL+PriceScale*B1 Then{
E1 = 1;
H1 = H;
i1 = index;
V1 = LL; //시작점 종가
}
if E1 == 1 and index > i1 then{
if H > H1 Then
H1 = H;
#저가가 시작봉종가보다 클때만 눌림체크
if L >= V1 and L <= H1-PriceScale*진입눌림1 Then{
E1 = 2;
i1 = index;
S1 = H1;
}
}
//시작점 종가보다 낮은 가격이 발생하면 초기화
if E1 >= 1 and L < V1 Then{
E1 = 0;
LL = L;
}
if E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1 and Tcond == true and 최대 >= C and C >= 최소 Then{
buy("b1");
}
}
if TotalTrades > TotalTrades[1] Then{
E1 = 0;
LL = L;
}
if L < LL Then
LL = L;
if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{
if E1 == 0 and C >= LL+PriceScale*B2 Then{
E1 = 1;
H1 = H;
i1 = index;
V1 = LL; //시작점 종가
}
if E1 == 1 and index > i1 then{
if H > H1 Then
H1 = H;
#저가가 시작봉종가보다 클때만 눌림체크
if L >= V1 and L <= H1-PriceScale*진입눌림2 Then{
E1 = 2;
i1 = index;
S1 = H1;
}
}
//시작점 종가보다 낮은 가격이 발생하면 초기화
if E1 >= 1 and L < V1 Then{
E1 = 0;
LL = L;
}
if (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) > 경과봉)) and E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2 and Tcond == true and 최대 >= C and C >= 최소 Then{
buy("b2");
}
}
}
답변 1
예스스탁 예스스탁 답변
2026-01-30 16:06:01