답변완료
함수요청
안녕하세요?
아래 글번호 84000번 재질문입니다.
국내선물 개장 후 3분봉의 7개 캔들의 장중 고점과 저점을 가격지표에 가로로 매일 매일 일간으로 적용 하고 있습니다.
작성주신 지표함수로는 표시가 다르게 나옵니다.
(가령 8시 45분부터 9시 6분 완성봉까지 7개의 고점과 저점을 그리고 싶습니다.)
검증 부탁드립니다.
감사합니다.
input : N(7);
var : ii(0),d1(0),t1(0),TL1(0),TL2(0);
if Bdate != Bdate[1] Then
{
ii = 0;
d1 = sDate;
t1 = sTime;
TL1 = TL_New(d1,t1,h,NextBarSdate,NextBarStime,h);
TL2 = TL_New(d1,t1,l,NextBarSdate,NextBarStime,l);
TL_SetColor(tl1,Red);
TL_SetColor(tl2,Blue);
TL_SetSize(tl1,1);
TL_SetSize(tl2,1);
}
ii = ii +1;
if ii < N Then
{
var1 = DayHigh;
Var2 = DayLow;
}
Else
{
var1 = highest(H,N);
Var2 = lowest(L,N);
}
TL_SetBegin(TL1,d1,t1,var1);
TL_SetBegin(TL2,d1,t1,var2);
TL_SetEnd(TL1,NextBarSdate,NextBarStime,var1);
TL_SetEnd(TL2,NextBarSdate,NextBarStime,var2);
2023-10-06
759
글번호 172878
지표
답변완료
수식작성요청
항상 고맙게 생각합니다 아래수식을 예스랭귀지로 변환 부탁드립니다^^
A=요일(DATE);
M=MAX(이전주고가(1),이전주고가(2),이전주고가(3),이전주고가(4),이전주고가(5));
조건=C>=M && 이전주누적거래량(1)*2<주0봉누적거래량();
HH=
if(A(1)>A,H,
if(A(2)>A(1),Highest(H,2),
if(A(3)>A(2),Highest(H,3),
if(A(4)>A(3),Highest(H,4),Highest(H,5)))));
LL=
if(A(1)>A,L,
if(A(2)>A(1),Lowest(L,2),
if(A(3)>A(2),Lowest(L,3),
if(A(4)>A(3),Lowest(L,4),Lowest(L,5)))));
VALUEWHEN(1, 조건, (HH--LL)*2/4+LL);
2023-10-05
798
글번호 172869
종목검색
답변완료
문의 드립니다
1
input : StartTime(170000),EndTime(50000);
input : 익절틱수(0),손절틱수(30);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
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 Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and C > ma(C,120) Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitLong();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : StartTime(170000),EndTime(50000);
input : 익절틱수(0),손절틱수(30);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
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 Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and C < ma(c,120) Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitShort();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
3
input : StartTime(210000),EndTime(60000);
input : 익절틱수(0),손절틱수(40);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
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 Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and C > ma(c,120) Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitLong();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and C < ma(c,120) Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitShort();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
위 3가지 수식어에
매수나 매도의 진입후 손절시 청산 소멸이 되질 않고 매도나 매수 체결이 됩니다.
그리고 그 체결의 역 방향으로 갈 때는 손절이 되질 않습니다.
수식어 수정이 가능한지 문의 드립니다.
-------------------------------------
아래 내용의 2가지 수식어를 부탁드립니다.
4.
* 매매시간 20 :00~ 익일 06:00
* 익절 100 손절 100
* 매수
캔들 저점이 낮아지는 6번의 음봉 (저점이 엇비슷하면 음봉이 아님) 이후
7번이 양봉 일때 8번의 매수 조건은 7번의 전체 폭 하단을 100% 가정했을때
하단 80% 매수
* 청산
캔들 고점이 높아지는 8번양봉 이후 12번 양봉에 (고점이 엇비슷하면 양봉이 아님) 청산
5.
* 매매시간 20 :00~ 익일 06:00
* 익절 100 손절 100
* 매도
캔들 고점이 높아지는 6번의 양봉 (저점이 엇비슷하면 음봉이 아님) 이후
7번이 음봉 일때 8번의 매도 조건은 7번의 전체 폭 하단을 100% 가정했을때
상단 20% 매도
* 청산
캔들 저점이 낮아지는 8번음봉 이후 12번 음봉에 (고점이 엇비슷하면 음봉이 아님) 청산
2023-10-06
517
글번호 172863
시스템