커뮤니티

함수 추가 부탁드립니다.

프로필 이미지
바둑이
2018-04-15 21:34:16
135
글번호 118218
답변완료
안녕하세요. 아래 수식에 시작시간을 13:00 로 설정 부탁드립니다. 감사합니다. Input: pLeng(2), pAtrVal(0.6); Vars : SP(0), TickValue(0); Vars : TT(0), dTT(0), v0(0), v1(0), v2(0), v3(0), v4(0), v5(0); SP = MarketPosition; v0 = ma(C, pLeng); v1 = pAtrVal * ATR(pLeng); v2 = v0 + v1; Condition1 = CrossUp(C, v2); If Condition1 Then Begin Condition2 = TRUE; v3 = H; End Else Begin Condition1 = Condition2 And (C < v0 Or H >= v3 + 1); If Condition1 Then Begin Condition2 = FALSE; End; End; If Condition2 Then Buy ("BUY", AtStop, v3); v0 = ma(C, pLeng); v1 = pAtrVal * ATR(pLeng); v4 = v0 - v1; Condition3 = CrossDown(C, v4); If Condition3 Then Begin Condition4 = TRUE; v5 = L; End Else Begin Condition3 = Condition4 And (C > v0 Or L <= v5 - 1); If Condition3 Then Condition4 = FALSE; End; If Condition4 Then Sell("SELL", AtStop, v5);
사용자 함수
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-04-16 13:48:31

안녕하세요 예스스탁입니다. Input: pLeng(2), pAtrVal(0.6),시간(130000); Var : SP(0), TickValue(0),Tcond(false); Var : TT(0), dTT(0), v0(0), v1(0), v2(0), v3(0), v4(0), v5(0); if bdate != bdate[1] Then tcond = false; if tcond == false and stime >= 시간 Then tcond = true; SP = MarketPosition; v0 = ma(C, pLeng); v1 = pAtrVal * ATR(pLeng); v2 = v0 + v1; Condition1 = CrossUp(C, v2); If Condition1 Then Begin Condition2 = TRUE; v3 = H; End Else Begin Condition1 = Condition2 And (C < v0 Or H >= v3 + 1); If Condition1 Then Begin Condition2 = FALSE; End; End; If Tcond == true and Condition2 Then Buy ("BUY", AtStop, v3); Condition3 = CrossDown(C, v4); If Condition3 Then Begin Condition4 = TRUE; v5 = L; End Else Begin Condition3 = Condition4 And (C > v0 Or L <= v5 - 1); If Condition3 Then Condition4 = FALSE; End; If Tcond == true and Condition4 Then Sell("SELL", AtStop, v5); 즐거운 하루되세요 > 바둑이 님이 쓴 글입니다. > 제목 : 함수 추가 부탁드립니다. > 안녕하세요. 아래 수식에 시작시간을 13:00 로 설정 부탁드립니다. 감사합니다. Input: pLeng(2), pAtrVal(0.6); Vars : SP(0), TickValue(0); Vars : TT(0), dTT(0), v0(0), v1(0), v2(0), v3(0), v4(0), v5(0); SP = MarketPosition; v0 = ma(C, pLeng); v1 = pAtrVal * ATR(pLeng); v2 = v0 + v1; Condition1 = CrossUp(C, v2); If Condition1 Then Begin Condition2 = TRUE; v3 = H; End Else Begin Condition1 = Condition2 And (C < v0 Or H >= v3 + 1); If Condition1 Then Begin Condition2 = FALSE; End; End; If Condition2 Then Buy ("BUY", AtStop, v3); v0 = ma(C, pLeng); v1 = pAtrVal * ATR(pLeng); v4 = v0 - v1; Condition3 = CrossDown(C, v4); If Condition3 Then Begin Condition4 = TRUE; v5 = L; End Else Begin Condition3 = Condition4 And (C > v0 Or L <= v5 - 1); If Condition3 Then Condition4 = FALSE; End; If Condition4 Then Sell("SELL", AtStop, v5);