커뮤니티

수식부탁드립니다---

프로필 이미지
leekss1
2012-03-08 08:12:56
357
글번호 48682
답변완료
var:상기준(0),하기준(0); //(상기준과 하기준은 계속 새로 만들어짐) 매수: 포지션없을때 상기준에 atstop 매수 리버스매도(1) 매수진입후 3틱이상수익났으면 상기준에 atstop 리버스 매도 매수진입후 1틱이상수익났으면 상기준 과 하기준 정중간에서 atstop 리버스 매도 매수진입후 수익없으면 하기준에 atstop 리버스 매도 매도: 포지션없을때 하기준에 atstop 매도 리버스매수(1) 매도진입후 3틱이상수익났으면 하기준에 atstop 리버스 매수 매도진입후 1틱이상수익났으면 상기준 과 하기준 정중간에서 atstop 리버스 매수 매도진입후 수익없으면 상기준에 atstop 리버스 매수 손절과,익절로 청산한경우 다음 상기준,하기준 나타날때 까지 진입금지 입니다 포지션있을때 새로 상기준,하기준 나타나면 위기준을 새로적용 손절10틱 익절10틱
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-03-08 11:02:14

안녕하세요 예스스탁입니다. var:상기준(0),하기준(0); var : cnt(0),count(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } Condition1 = (MarketPosition == 0 and count == 0) Or (MarketPosition == 0 and count > 0 and IsExitName("bx",1) == false and IsExitName("sx",1) == false) or (MarketPosition == 0 and count > 0 and (IsExitName("StopLoss",1) or IsExitName("StopProfittarget",1)) and 상기준 != 상기준[BarsSinceEntry(1)] and 하기준 != 하기준[BarsSinceEntry(1)]); if MarketPosition == 0 and Condition1 == true Then{ buy("b1",AtStop,상기준); sell("s1",AtStop,하기준); } if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry+1) >= EntryPrice+PriceScale*3 Then sell("bs1",AtStop,상기준); if highest(H,BarsSinceEntry+1) >= EntryPrice+PriceScale*1 Then sell("bs2",AtStop,(상기준+하기준)/2); sell("bs3",AtStop,하기준); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry+1) <= EntryPrice-PriceScale*3 Then buy("sb1",AtStop,하기준); if Lowest(L,BarsSinceEntry+1) <= EntryPrice-PriceScale*1 Then buy("sb2",AtStop,(상기준+하기준)/2); sell("sb3",AtStop,하기준); } SetStopLoss(PriceScale*10,PointStop); SetStopProfittarget(PriceScale*10,PointStop); 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 수식부탁드립니다--- > var:상기준(0),하기준(0); //(상기준과 하기준은 계속 새로 만들어짐) 매수: 포지션없을때 상기준에 atstop 매수 리버스매도(1) 매수진입후 3틱이상수익났으면 상기준에 atstop 리버스 매도 매수진입후 1틱이상수익났으면 상기준 과 하기준 정중간에서 atstop 리버스 매도 매수진입후 수익없으면 하기준에 atstop 리버스 매도 매도: 포지션없을때 하기준에 atstop 매도 리버스매수(1) 매도진입후 3틱이상수익났으면 하기준에 atstop 리버스 매수 매도진입후 1틱이상수익났으면 상기준 과 하기준 정중간에서 atstop 리버스 매수 매도진입후 수익없으면 상기준에 atstop 리버스 매수 손절과,익절로 청산한경우 다음 상기준,하기준 나타날때 까지 진입금지 입니다 포지션있을때 새로 상기준,하기준 나타나면 위기준을 새로적용 손절10틱 익절10틱