커뮤니티

부탁합니다.

프로필 이미지
너무조아
2016-08-24 14:14:14
113
글번호 101310
답변완료
아래수식의 오류부분의 수정을 부탁드립니다. Input : N(1),k(0.05); var : Bcnt(0),Scnt(0); var1 = DayClose(N); If Bdate != Bdate[1] Then { Bcnt = 0; Scnt = 0; If O > var1 Then buy("b",AtStop,var1+k); If O < var1 Then sell("s",AtStop,var1-k); } If Bdate == Bdate[1] Then { Bcnt = Bcnt+1; O[1] == L; c[1] == H; O == L; C == H; if Bcnt >= 1 Then { If O[1] < DayClose(N) and C[1] = DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b2",AtStop,var1+K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b3",AtStop,var1+k); } If O[1] == DayClose(N) and C[1] > DayClose(N) Then { If O > DayClose(N) and C > DayClose(N) Then Buy("b4",AtStop,var1+k); } If O < DayClose(N) and C > DayClose(N) Then Buy("b5",AtStop,var1+k); } Scnt = Scnt+1; O[1] == H; c[1] == L; O == H; C == L; if Scnt >= 1 Then { If O[1] > DayClose(N) and C[1] = DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s2",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s3",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] < DayClose(N) Then { If O < DayClose(N) and C < DayClose(N) Then Sell("s4",AtStop,var1-K); } If O > DayClose(N) and C < DayClose(N) Then Sell("s5",AtStop,var1-K); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-08-24 16:57:33

안녕하세요 예스스탁입니다. 예스랭귀지에서 2개의 값이 같다는 표현은 == 입니다. Input : N(1),k(0.05); var : Bcnt(0),Scnt(0); var1 = DayClose(N); If Bdate != Bdate[1] Then { Bcnt = 0; Scnt = 0; If O > var1 Then buy("b",AtStop,var1+k); If O < var1 Then sell("s",AtStop,var1-k); } If Bdate == Bdate[1] Then { Bcnt = Bcnt+1; O[1] == L; c[1] == H; O == L; C == H; if Bcnt >= 1 Then { If O[1] < DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b2",AtStop,var1+K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b3",AtStop,var1+k); } If O[1] == DayClose(N) and C[1] > DayClose(N) Then { If O > DayClose(N) and C > DayClose(N) Then Buy("b4",AtStop,var1+k); } If O < DayClose(N) and C > DayClose(N) Then Buy("b5",AtStop,var1+k); } Scnt = Scnt+1; O[1] == H; c[1] == L; O == H; C == L; if Scnt >= 1 Then { If O[1] > DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s2",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s3",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] < DayClose(N) Then { If O < DayClose(N) and C < DayClose(N) Then Sell("s4",AtStop,var1-K); } If O > DayClose(N) and C < DayClose(N) Then Sell("s5",AtStop,var1-K); } } 즐거운 하루되세요 > 너무조아 님이 쓴 글입니다. > 제목 : 부탁합니다. > 아래수식의 오류부분의 수정을 부탁드립니다. Input : N(1),k(0.05); var : Bcnt(0),Scnt(0); var1 = DayClose(N); If Bdate != Bdate[1] Then { Bcnt = 0; Scnt = 0; If O > var1 Then buy("b",AtStop,var1+k); If O < var1 Then sell("s",AtStop,var1-k); } If Bdate == Bdate[1] Then { Bcnt = Bcnt+1; O[1] == L; c[1] == H; O == L; C == H; if Bcnt >= 1 Then { If O[1] < DayClose(N) and C[1] = DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b2",AtStop,var1+K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C > DayClose(N) Then Buy("b3",AtStop,var1+k); } If O[1] == DayClose(N) and C[1] > DayClose(N) Then { If O > DayClose(N) and C > DayClose(N) Then Buy("b4",AtStop,var1+k); } If O < DayClose(N) and C > DayClose(N) Then Buy("b5",AtStop,var1+k); } Scnt = Scnt+1; O[1] == H; c[1] == L; O == H; C == L; if Scnt >= 1 Then { If O[1] > DayClose(N) and C[1] = DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s2",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] == DayClose(N) Then { If O == DayClose(N) and C < DayClose(N) Then Sell("s3",AtStop,var1-K); } If O[1] == DayClose(N) and C[1] < DayClose(N) Then { If O < DayClose(N) and C < DayClose(N) Then Sell("s4",AtStop,var1-K); } If O > DayClose(N) and C < DayClose(N) Then Sell("s5",AtStop,var1-K); } }