커뮤니티

도와주세요....

프로필 이미지
검은머리외국인
2012-04-03 20:49:11
314
글번호 49709
답변완료
하나만 더 여쭙겠습니다 .. Input : Period(20), D(2); var : value1(0),value2(0); value1 = BollBandDown(Period,D); value2 = BollBandUp(Period,D); if crossup(C,value1) then buy(); if crossdown(c,value2) then sell(); 위 식에서 매수와 매도에 조건을 걸고 싶습니다 .. 필터처럼요 .. 매수는 if C > O And C[1] < O[1] and C[2] < O[2] and C[3] < O[3] Then buy(); 매도는 if BarsSinceEntry < 30 and C < O And C[1] > O[1] and C[2] > O[2] and C[3] > O[3] Then Sell(); 이렇게 각각 매수와 매도에 이 조건이 성립이 되면 신호를 발생시키고 싶은데요 .. 이걸 추가하려면 어떻게 해야하나요 ? 아무리해도 안되네요 ㅠㅠ 도와주세요 ......
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-04-04 09:21:57

안녕하세요 예스스탁입니다. Input : Period(20), D(2); var : value1(0),value2(0); value1 = BollBandDown(Period,D); value2 = BollBandUp(Period,D); if C > O And C[1] < O[1] and C[2] < O[2] and C[3] < O[3] and crossup(C,value1) then buy(); if BarsSinceEntry < 30 and C < O And C[1] > O[1] and C[2] > O[2] and C[3] > O[3] and crossdown(c,value2) then sell(); 즐거운 하루되세요 > 관뉴 님이 쓴 글입니다. > 제목 : 도와주세요.... > 하나만 더 여쭙겠습니다 .. Input : Period(20), D(2); var : value1(0),value2(0); value1 = BollBandDown(Period,D); value2 = BollBandUp(Period,D); if crossup(C,value1) then buy(); if crossdown(c,value2) then sell(); 위 식에서 매수와 매도에 조건을 걸고 싶습니다 .. 필터처럼요 .. 매수는 if C > O And C[1] < O[1] and C[2] < O[2] and C[3] < O[3] Then buy(); 매도는 if BarsSinceEntry < 30 and C < O And C[1] > O[1] and C[2] > O[2] and C[3] > O[3] Then Sell(); 이렇게 각각 매수와 매도에 이 조건이 성립이 되면 신호를 발생시키고 싶은데요 .. 이걸 추가하려면 어떻게 해야하나요 ? 아무리해도 안되네요 ㅠㅠ 도와주세요 ......