커뮤니티
로직부탁..^
2008-06-12 13:58:31
757
글번호 15708
다음은 대신의 사이보스트레이더로 작성한 로직입니다.
이를 선물1분봉차트를 "참조차트"로 하여 콜옵션매수,매수청산하는 로직을 예스트레이더로 변환하고자 합니다.
수고스러우시더라도 예스3.0, 예스3.1 양 버전 로직식으로을 부탁합니다.^(모투와 실전에서 버전이 달라서 말이죠.^)
그리고, 선물와 옵션에서 각 슬리피지를 얼마로 해야 적정할까요?
메일(aceace77@hanmail.net)로 답변부탁드립니다. 수고하십시요..
----------------------------------------------------------------------------------
input:p1(5),p2(20),p3(30),p4(40),p5(50),p6(60),FlrPct1(10),FlrPct2(50),TrlPct (10),hlen(30),StpPct(10),
Var1 = mov(close,P1,s)
Var2 = mov(close,P2,s)
Var3 = mov(close,P3,s)
Var4 = mov(close,P4,s)
Var5 = mov(close,P5,s)
Var6 = mov(close,P6,s)
->> 종가상승
Cond1=close(1)<close
->> 20이평상향
Cond2=var2(3)<var2(2) And Var2(2)<var2(1) And Var2(1)<var2
->> 정배열
Cond3=var1>=var2 And Var2>=var3 And Var3>=var4 And Var4>=var5 And Var5>=var6
->> 상향
Cond4=var1>=var1(1) And Var2>=var2(1) And Var3>=var3(1) And Var4>=var4(1) And Var5>=var5(1) And Var6>=var6(1)
If tdate(1)<>tdate Then ->> 날짜가 바뀌면
Var10=currentEntrynum
End If
If ttime<1500 Then
If tdate<>tdate(1) Then
If currentEntrynum < Var10+tcount Then ->> 금일 진입횟수가 tcount보다 작으면
If Cond1 And Cond2 And Cond3 and cond4 Then
Call buy("매수",Atstop,Def,high)
End If
End If
End If
If crossdn(Var1,Var3) Then
Call exitlong("매수청산",Onclose)
End If
If Position = 1 Then
MaxP = HHV(1, High, BarNumSinceEntry + 1)
If MaxP >= (EntryPrice * (1 + FlrPct1 / 100)) Then
If MaxP > EntryPrice * (1 + FlrPct2 / 100) Then
Call ExitLong("이익보존", Atstop, MaxP * (1 - TrlPct / 100))
Else
Call ExitLong("추적스톱", Atstop, LLV(1, Low, int(hlen / 2)))
End If
Else
Call exitLong("손절매", Atstop, EntryPrice * (1 - StpPct / 100))
End If
If MaxBar <= BarNumSinceEntry + 1 And MaxP < EntryPrice * (1 + FlrPct1 / 100) Then
Call ExitLong("기간청산", Atmarket)
End If
End If
End If
----------------------------------------------------------------------------------
답변 1
예스스탁 예스스탁 답변
2008-06-12 17:44:45
> 송사범 님이 쓴 글입니다.
> 제목 : 로직부탁..^
> 다음은 대신의 사이보스트레이더로 작성한 로직입니다.
이를 선물1분봉차트를 "참조차트"로 하여 콜옵션매수,매수청산하는 로직을 예스트레이더로 변환하고자 합니다.
수고스러우시더라도 예스3.0, 예스3.1 양 버전 로직식으로을 부탁합니다.^(모투와 실전에서 버전이 달라서 말이죠.^)
그리고, 선물와 옵션에서 각 슬리피지를 얼마로 해야 적정할까요?
메일(aceace77@hanmail.net)로 답변부탁드립니다. 수고하십시요..
----------------------------------------------------------------------------------
input:p1(5),p2(20),p3(30),p4(40),p5(50),p6(60),FlrPct1(10),FlrPct2(50),TrlPct (10),hlen(30),StpPct(10),
Var1 = mov(close,P1,s)
Var2 = mov(close,P2,s)
Var3 = mov(close,P3,s)
Var4 = mov(close,P4,s)
Var5 = mov(close,P5,s)
Var6 = mov(close,P6,s)
->> 종가상승
Cond1=close(1)<close
->> 20이평상향
Cond2=var2(3)<var2(2) And Var2(2)<var2(1) And Var2(1)<var2
->> 정배열
Cond3=var1>=var2 And Var2>=var3 And Var3>=var4 And Var4>=var5 And Var5>=var6
->> 상향
Cond4=var1>=var1(1) And Var2>=var2(1) And Var3>=var3(1) And Var4>=var4(1) And Var5>=var5(1) And Var6>=var6(1)
If tdate(1)<>tdate Then ->> 날짜가 바뀌면
Var10=currentEntrynum
End If
If ttime<1500 Then
If tdate<>tdate(1) Then
If currentEntrynum < Var10+tcount Then ->> 금일 진입횟수가 tcount보다 작으면
If Cond1 And Cond2 And Cond3 and cond4 Then
Call buy("매수",Atstop,Def,high)
End If
End If
End If
If crossdn(Var1,Var3) Then
Call exitlong("매수청산",Onclose)
End If
If Position = 1 Then
MaxP = HHV(1, High, BarNumSinceEntry + 1)
If MaxP >= (EntryPrice * (1 + FlrPct1 / 100)) Then
If MaxP > EntryPrice * (1 + FlrPct2 / 100) Then
Call ExitLong("이익보존", Atstop, MaxP * (1 - TrlPct / 100))
Else
Call ExitLong("추적스톱", Atstop, LLV(1, Low, int(hlen / 2)))
End If
Else
Call exitLong("손절매", Atstop, EntryPrice * (1 - StpPct / 100))
End If
If MaxBar <= BarNumSinceEntry + 1 And MaxP < EntryPrice * (1 + FlrPct1 / 100) Then
Call ExitLong("기간청산", Atmarket)
End If
End If
End If
----------------------------------------------------------------------------------
다음글
이전글