커뮤니티
CT를 YT로 변환 부탁드립니다^^
2010-06-11 05:49:29
1105
글번호 30381
Cond1 = (highd(3)-lowd(3))
Cond2 = (tdate <> entrydate(5) And Cond1/4>(highd(1)-lowd(1)) And Cond1/5>(highd-lowd)) Or (tdate <> entrydate(3) And Cond1/4<(highd(1)-lowd(1)) And Cond1/5<(highd-lowd))
If position = 0 Then
If cond2 and close>opend Then
Call buy("매수",Atmarket)
Elseif cond2 and close<opend Then
Call sell("매도",Atmarket)
End If
Elseif position = 1 Then
If close<opend Then
Call Exitlong("청산",Atmarket)
End If
Elseif position = -1 Then
If close>opend Then
Call Exitshort("청산",Atmarket)
End If
End If
변환 부탁드립니다^^
미리 감사 드립니다.
답변 1
예스스탁 예스스탁 답변
2010-06-11 08:48:17
안녕하세요
예스스탁입니다.
var1 = (dayhigh(3)-daylow(3));
condition2 = (sdate <> entrydate(5) And var1/4>(dayhigh(1)-daylow(1)) And var1/5>(dayhigh-daylow)) Or
(sdate <> entrydate(3) And var1/4<(dayhigh(1)-daylow(1)) And var1/5<(dayhigh-daylow));
If MarketPosition == 0 then{
If condition2 and close>dayopen then{
buy("매수",Atmarket);
}
if condition2 and close<dayopen then{
sell("매도",Atmarket);
}
}
if MarketPosition == 1 then{
if close<dayopen then{
Exitlong("매수청산",Atmarket);
}
}
if MarketPosition == -1 then{
If close>dayopen then{
Exitshort("매도청산",Atmarket);
}
}
즐거운 하루되세요
> 나는나 님이 쓴 글입니다.
> 제목 : CT를 YT로 변환 부탁드립니다^^
>
Cond1 = (highd(3)-lowd(3))
Cond2 = (tdate <> entrydate(5) And Cond1/4>(highd(1)-lowd(1)) And Cond1/5>(highd-lowd)) Or (tdate <> entrydate(3) And Cond1/4<(highd(1)-lowd(1)) And Cond1/5<(highd-lowd))
If position = 0 Then
If cond2 and close>opend Then
Call buy("매수",Atmarket)
Elseif cond2 and close<opend Then
Call sell("매도",Atmarket)
End If
Elseif position = 1 Then
If close<opend Then
Call Exitlong("청산",Atmarket)
End If
Elseif position = -1 Then
If close>opend Then
Call Exitshort("청산",Atmarket)
End If
End If
변환 부탁드립니다^^
미리 감사 드립니다.
다음글
이전글