Input : af(0.02), maxAF(0.2);
Var : value(0);
value = sar(af,maxAF);
# 매수/매도청산
If C > value Then
{
Buy();
}
# 매도/매수청산
If C < value Then
{
Sell();
}
이 수식에 오후 4시부터 오전2시까지만 신호에 진입하도록 설정해주세요
답변 1
예스스탁
예스스탁 답변
2021-10-05 09:12:03
안녕하세요
예스스탁입니다.
Input : af(0.02), maxAF(0.2);
input : StartTime(160000),EndTime(020000);
Var : value(0);
var : Tcond(false);
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;
value = sar(af,maxAF);
if Tcond == true Then
{
If CrossUp(C,value) Then
Buy();
If CrossDown(C,value) Then
Sell();
}
즐거운 하루되세요
> 감사합니다 님이 쓴 글입니다.
> 제목 : 시간설정
> Input : af(0.02), maxAF(0.2);
Var : value(0);
value = sar(af,maxAF);
# 매수/매도청산
If C > value Then
{
Buy();
}
# 매도/매수청산
If C < value Then
{
Sell();
}
이 수식에 오후 4시부터 오전2시까지만 신호에 진입하도록 설정해주세요