input : StartTime(150000),EndTime(055000),xtime(055500);
var : Tcond(false);
if sDate != sDate[1] then
SetStopEndofday(xtime);
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;
SetStopEndofday(0);
}
Input : Period(20);
Var : value(0);
value = VR(Period);
# 매수/매도청산
If CrossUP(value, 100) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value, 300) Then
{
Sell();
}
-------------------------
수식어 추가입니다.
이격도 50의 기준선 100 이상 sell신호는 buy 전환
이격도 50의 기준선 100 이하 buy 신호는 sell 전환
늘 감사드립니다.
답변 1
예스스탁
예스스탁 답변
2021-05-17 11:44:24
안녕하세요
예스스탁입니다.
input : StartTime(150000),EndTime(055000),xtime(055500);
var : Tcond(false);
if sDate != sDate[1] then
SetStopEndofday(xtime);
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;
SetStopEndofday(0);
}
Input : Period(20),P1(50);
Var : value(0),dis(0);
value = VR(Period);
dis = Disparity(50);
# 매수/매도청산
If CrossUP(value, 100) Then
{
if dis <= 100 Then
Sell();
Else
Buy();
}
# 매도/매수청산
If CrossDown(value, 300) Then
{
if dis >= 100 Then
Buy();
Else
Sell();
}
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 수식작성
> input : StartTime(150000),EndTime(055000),xtime(055500);
var : Tcond(false);
if sDate != sDate[1] then
SetStopEndofday(xtime);
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;
SetStopEndofday(0);
}
Input : Period(20);
Var : value(0);
value = VR(Period);
# 매수/매도청산
If CrossUP(value, 100) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value, 300) Then
{
Sell();
}
-------------------------
수식어 추가입니다.
이격도 50의 기준선 100 이상 sell신호는 buy 전환
이격도 50의 기준선 100 이하 buy 신호는 sell 전환
늘 감사드립니다.