커뮤니티

수식변경부탁이요

프로필 이미지
에릭짱
2008-12-11 19:20:52
839
글번호 18692
답변완료
대신에서 나온식인데 yes로 수식변경부탁드립니다. hyunggi3@naver.com으로 주세요. Input : len(0.37), stoploss(0.019), break(0.015), bigprofit(0.042) Var1 = highd(1)-lowd(1) Cond1 = exitname(1) = "매수추적" and tdate = exitdate(1) and exitprice(1) > OpenD + Var1 * len Cond2 = exitname(1) = "매도추적" and tdate = exitdate(1) and exitprice(1) < OpenD - Var1 * len Cond3 = exitname(1) = "매수브레이크" and tdate = exitdate(1) and exitprice(1) > OpenD + Var1 * len Cond4 = exitname(1) = "매도브레이크" and tdate = exitdate(1) and exitprice(1) > OpenD - Var1 * len if ttime < 1500 Then if Cond1=False and Cond3=False Then Call Buy("매수", AtStop, Def, OpenD + Var1*len) End If If Cond2=False and Cond4=False Then Call sell("매도", AtStop, Def, OpenD - Var1+len) End If End If if position <>0 Then Call exitlong("매수손절", AtStop, EntryPrice*(1-stoploss)) Call ExitShort("매도손절", AtStop, EntryPrice*(1+stoploss)) End If If position <>0 Then Call exitlong("매수추적", AtStop, hhv(1, high, barnumsinceEntry+1)*(1-stoploss)) Call ExitShort("매도추적", AtStop, llv(1, Low, barnumsinceEntry+1)*(1+stoploss)) End If If position=1 Then If hhv(1,High,barnumsinceEntry+1)>EntryPrice*(1+break) Then Call Exitlong("매수브레이크", AtStop, EntryPrice+0.2) Call Exitlong("매수추적", AtStop, hhv(1,High,BarnumSinceEntry+1)*(1-stoploss)) End If If hhv(1,High,barnumsinceEntry+1)>EntryPrice*(1+bigprofit) Then Call Exitlong("매수추적", AtStop, hhv(1,High,BarnumSinceEntry+1)*(1-stoploss)*0.5) end If End If If position =-1 Then if llv(1, low, barnumsinceEntry+1)<EntryPrice*(1-break) Then Call Exitshort("매도브레이크", AtStop, EntryPrice-0.2) Call Exitshort("매도추적", AtStop, llv(1, low, BarnumSinceEntry+1)*(1+stoploss)) End If If llv(1, low,barnumsinceEntry+1)<EntryPrice*(1-bigprofit) Then Call exitshort("매도추적", AtStop, llv(1,low,barnumsinceEntry+1)*(1+stoploss)*0.5) End If End If
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2008-12-12 09:19:30

> 에릭짱 님이 쓴 글입니다. > 제목 : 수식변경부탁이요 > 대신에서 나온식인데 yes로 수식변경부탁드립니다. hyunggi3@naver.com으로 주세요. Input : len(0.37), stoploss(0.019), break(0.015), bigprofit(0.042) Var1 = highd(1)-lowd(1) Cond1 = exitname(1) = "매수추적" and tdate = exitdate(1) and exitprice(1) > OpenD + Var1 * len Cond2 = exitname(1) = "매도추적" and tdate = exitdate(1) and exitprice(1) < OpenD - Var1 * len Cond3 = exitname(1) = "매수브레이크" and tdate = exitdate(1) and exitprice(1) > OpenD + Var1 * len Cond4 = exitname(1) = "매도브레이크" and tdate = exitdate(1) and exitprice(1) > OpenD - Var1 * len if ttime < 1500 Then if Cond1=False and Cond3=False Then Call Buy("매수", AtStop, Def, OpenD + Var1*len) End If If Cond2=False and Cond4=False Then Call sell("매도", AtStop, Def, OpenD - Var1+len) End If End If if position <>0 Then Call exitlong("매수손절", AtStop, EntryPrice*(1-stoploss)) Call ExitShort("매도손절", AtStop, EntryPrice*(1+stoploss)) End If If position <>0 Then Call exitlong("매수추적", AtStop, hhv(1, high, barnumsinceEntry+1)*(1-stoploss)) Call ExitShort("매도추적", AtStop, llv(1, Low, barnumsinceEntry+1)*(1+stoploss)) End If If position=1 Then If hhv(1,High,barnumsinceEntry+1)>EntryPrice*(1+break) Then Call Exitlong("매수브레이크", AtStop, EntryPrice+0.2) Call Exitlong("매수추적", AtStop, hhv(1,High,BarnumSinceEntry+1)*(1-stoploss)) End If If hhv(1,High,barnumsinceEntry+1)>EntryPrice*(1+bigprofit) Then Call Exitlong("매수추적", AtStop, hhv(1,High,BarnumSinceEntry+1)*(1-stoploss)*0.5) end If End If If position =-1 Then if llv(1, low, barnumsinceEntry+1)<EntryPrice*(1-break) Then Call Exitshort("매도브레이크", AtStop, EntryPrice-0.2) Call Exitshort("매도추적", AtStop, llv(1, low, BarnumSinceEntry+1)*(1+stoploss)) End If If llv(1, low,barnumsinceEntry+1)<EntryPrice*(1-bigprofit) Then Call exitshort("매도추적", AtStop, llv(1,low,barnumsinceEntry+1)*(1+stoploss)*0.5) End If End If