커뮤니티

수식확인부탁드립니다.

프로필 이미지
마코
2014-02-19 13:58:14
143
글번호 72719
답변완료
시스템 출력이 되지 않는데, 이상있는지 확인 부탁드립니다. var : T1(0),T2(0),T3(0),T4(0),T5(0),T6(0); var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0); input : dayentry(4),당일손실(-1.4),loss(100),Profit(100); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } NP = NetProfit; if date != date[1] Then{ Condition1 = False; PreNP = NP[1]; } dayPL = (NP-PreNP)+PositionProfit; input : N(0); X = min(T1,T2,T3,T4); W = iff(T5[1]<T5,X,T5); if count < dayentry and Condition1 == true and dayPL > 당일손실 Then{ if T1 > W and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{ buy(); } } if T1 <= W and count < N then { if count == 0 or (count >= 1 and MarketPosition == 1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{ sell(); } } } SetStopProfittarget(Profit,PointStop); SetStopLoss(loss,PointStop); SetStopEndofday(150000); if MarketPosition == 1 and T1 <= W Then ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL)); if MarketPosition == -1 and T1 > W Then ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL)); if MarketPosition == 1 and T1 <= W Then ExitLong(); if MarketPosition == -1 and T1 > W Then ExitShort(); 항상 수고하십니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-02-19 15:11:53

안녕하세요 예스스탁입니다. 수식에서 count는 당일진입횟수가 계산되어 저장되는 변수입니다. 진입수식에 count < dayentry도 있고 count < N도 있어 중복처리가 되어 있고 N이 0으로 되어 있어 신호가 발생되지 않았습니다. count < N은 삭제하시면 됩니다. var : T1(0),T2(0),T3(0),T4(0),T5(0),T6(0); var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0); input : dayentry(4),당일손실(-1.4),loss(100),Profit(100); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } NP = NetProfit; if date != date[1] Then{ Condition1 = False; PreNP = NP[1]; } dayPL = (NP-PreNP)+PositionProfit; X = min(T1,T2,T3,T4); W = iff(T5[1]<T5,X,T5); if count < dayentry and dayPL > 당일손실 Then{ if T1 > W Then{ if count == 0 or (count >= 1 and MarketPosition == -1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{ buy(); } } if T1 <= W then { if count == 0 or (count >= 1 and MarketPosition == 1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{ sell(); } } } SetStopProfittarget(Profit,PointStop); SetStopLoss(loss,PointStop); SetStopEndofday(150000); if MarketPosition == 1 and T1 <= W Then ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL)); if MarketPosition == -1 and T1 > W Then ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL)); if MarketPosition == 1 and T1 <= W Then ExitLong(); if MarketPosition == -1 and T1 > W Then ExitShort(); 즐거운 하루되세요 > 마코 님이 쓴 글입니다. > 제목 : 수식확인부탁드립니다. > 시스템 출력이 되지 않는데, 이상있는지 확인 부탁드립니다. var : T1(0),T2(0),T3(0),T4(0),T5(0),T6(0); var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0); input : dayentry(4),당일손실(-1.4),loss(100),Profit(100); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } NP = NetProfit; if date != date[1] Then{ Condition1 = False; PreNP = NP[1]; } dayPL = (NP-PreNP)+PositionProfit; input : N(0); X = min(T1,T2,T3,T4); W = iff(T5[1]<T5,X,T5); if count < dayentry and Condition1 == true and dayPL > 당일손실 Then{ if T1 > W and count < N Then{ if count == 0 or (count >= 1 and MarketPosition == -1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{ buy(); } } if T1 <= W and count < N then { if count == 0 or (count >= 1 and MarketPosition == 1) Or (Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{ sell(); } } } SetStopProfittarget(Profit,PointStop); SetStopLoss(loss,PointStop); SetStopEndofday(150000); if MarketPosition == 1 and T1 <= W Then ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL)); if MarketPosition == -1 and T1 > W Then ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL)); if MarketPosition == 1 and T1 <= W Then ExitLong(); if MarketPosition == -1 and T1 > W Then ExitShort(); 항상 수고하십니다. 감사합니다.