커뮤니티

감사합니다.

프로필 이미지
huhboo99
2013-11-29 15:48:21
149
글번호 69974
답변완료
아래와 같이 하였는데 검증이 되지 않습니다.감사합니다. Condition1 = ExitDate(1) == sdate and MarketPosition == 0 And (IsExitName("bx1",1) == true or IsExitName("bx2",1) == true or IsExitName("StopTrailing",1)==true); var1 = (c+o)/2; var2 = ma(var1,5); var3 = ma(var1,20); var4 : cnt(0),EntryCount(0),LossCount(0); EntryCount = 0; LossCount = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then EntryCount = EntryCount+1; if sdate == EntryDate(cnt) and PositionProfit(cnt) < 0 Then LossCount = LossCount+1; } if crossdown (var2, var3) Then{ value1 = sdate; value2 = TimeToMinutes(stime); } if sdate == value1 and TimeToMinutes(stime) >= value2+20 and Condition1 == false or (Condition1 == true and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+90) Then{ if TimeToMinutes(stime) <= value2 +70 and (absValue(var3-var2)/var3)<=0.05 and Entrycount < 5 and LossCount < 3 Then buy("bi",onclose); } if MarketPosition == 1 and (Isentryname("bi")==true ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.20 Then ExitLong("bx1",atstop,var2*0.98); } if MarketPosition == 1 and ( Isentryname("bi") ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.30 Then ExitLong("bx2",atstop,var2*0.985); } > 안녕하세요 예스스탁입니다. 2. var : cnt(0),EntryCount(0),LossCount(0); EntryCount = 0; LossCount = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then EntryCount = EntryCount+1; if sdate == EntryDate(cnt) and PositionProfit(cnt) < 0 Then LossCount = LossCount+1; } if Entrycount < 5 and LossCount < 3 Then{ if 매수진입조건 Then buy(); if 매도진입조건 Then sell(); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-11-29 19:07:30

안녕하세요 예스스탁입니다. 내부변수의 선언은 var : 입니다. var : cnt(0),EntryCount(0),LossCount(0); Condition1 = ExitDate(1) == sdate and MarketPosition == 0 And (IsExitName("bx1",1) == true or IsExitName("bx2",1) == true or IsExitName("StopTrailing",1)==true); var1 = (c+o)/2; var2 = ma(var1,5); var3 = ma(var1,20); EntryCount = 0; LossCount = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then EntryCount = EntryCount+1; if sdate == EntryDate(cnt) and PositionProfit(cnt) < 0 Then LossCount = LossCount+1; } if crossdown (var2, var3) Then{ value1 = sdate; value2 = TimeToMinutes(stime); } if sdate == value1 and TimeToMinutes(stime) >= value2+20 and Condition1 == false or (Condition1 == true and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+90) Then{ if TimeToMinutes(stime) <= value2 +70 and (absValue(var3-var2)/var3)<=0.05 and Entrycount < 5 and LossCount < 3 Then buy("bi",onclose); } if MarketPosition == 1 and (Isentryname("bi")==true ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.20 Then ExitLong("bx1",atstop,var2*0.98); } if MarketPosition == 1 and ( Isentryname("bi") ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.30 Then ExitLong("bx2",atstop,var2*0.985); } 즐거운 하루되세요 > huhboo99 님이 쓴 글입니다. > 제목 : 감사합니다. > 아래와 같이 하였는데 검증이 되지 않습니다.감사합니다. Condition1 = ExitDate(1) == sdate and MarketPosition == 0 And (IsExitName("bx1",1) == true or IsExitName("bx2",1) == true or IsExitName("StopTrailing",1)==true); var1 = (c+o)/2; var2 = ma(var1,5); var3 = ma(var1,20); var4 : cnt(0),EntryCount(0),LossCount(0); EntryCount = 0; LossCount = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then EntryCount = EntryCount+1; if sdate == EntryDate(cnt) and PositionProfit(cnt) < 0 Then LossCount = LossCount+1; } if crossdown (var2, var3) Then{ value1 = sdate; value2 = TimeToMinutes(stime); } if sdate == value1 and TimeToMinutes(stime) >= value2+20 and Condition1 == false or (Condition1 == true and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+90) Then{ if TimeToMinutes(stime) <= value2 +70 and (absValue(var3-var2)/var3)<=0.05 and Entrycount < 5 and LossCount < 3 Then buy("bi",onclose); } if MarketPosition == 1 and (Isentryname("bi")==true ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.20 Then ExitLong("bx1",atstop,var2*0.98); } if MarketPosition == 1 and ( Isentryname("bi") ) Then{ if highest(H,BarsSinceEntry) >= EntryPrice*1.30 Then ExitLong("bx2",atstop,var2*0.985); } > 안녕하세요 예스스탁입니다. 2. var : cnt(0),EntryCount(0),LossCount(0); EntryCount = 0; LossCount = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then EntryCount = EntryCount+1; if sdate == EntryDate(cnt) and PositionProfit(cnt) < 0 Then LossCount = LossCount+1; } if Entrycount < 5 and LossCount < 3 Then{ if 매수진입조건 Then buy(); if 매도진입조건 Then sell(); }