커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-02-08 04:51:36
153
글번호 116429
답변완료
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 기타 예스코드로 변환 부탁드립니다. inputs: Price( Close ), RetracePct( 5 ) ; variables: LowPrice( 0 ), HighPrice( 0 ), RetraceFctrUp( 0 ), RetraceFctrDn( 0 ) ; if CurrentBar = 1 then begin LowPrice = Price ; HighPrice = Price ; RetraceFctrUp = 1 + 0.01 * RetracePct ; RetraceFctrDn = 1 - 0.01 * RetracePct ; end else begin if Price < LowPrice then LowPrice = Price ; if Price > HighPrice then HighPrice = Price ; if MarketPosition < 1 and Price >= LowPrice * RetraceFctrUp then begin Buy this bar on Close ; HighPrice = Price ; end else if MarketPosition > -1 and Price <= HighPrice * RetraceFctrDn then begin Sell Short this bar on Close ; LowPrice = Price ; end ; end ;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-02-08 14:50:12

안녕하세요 예스스탁입니다. inputs : RetracePct( 5 ) ; variables: LowPrice(0), HighPrice(0), RetraceFctrUp(0), RetraceFctrDn(0),Price(0); Price = C; if CurrentBar == 1 then { LowPrice = Price ; HighPrice = Price ; RetraceFctrUp = 1 + 0.01 * RetracePct ; RetraceFctrDn = 1 - 0.01 * RetracePct ; } else { if Price < LowPrice then LowPrice = Price ; if Price > HighPrice then HighPrice = Price ; if MarketPosition <= 0 and Price >= LowPrice * RetraceFctrUp then { Buy("b",OnClose); HighPrice = Price ; } if MarketPosition >= 0 and Price <= HighPrice *RetraceFctrDn then { Sell("s",OnClose); LowPrice = Price ; } } 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 기타 예스코드로 변환 부탁드립니다. inputs: Price( Close ), RetracePct( 5 ) ; variables: LowPrice( 0 ), HighPrice( 0 ), RetraceFctrUp( 0 ), RetraceFctrDn( 0 ) ; if CurrentBar = 1 then begin LowPrice = Price ; HighPrice = Price ; RetraceFctrUp = 1 + 0.01 * RetracePct ; RetraceFctrDn = 1 - 0.01 * RetracePct ; end else begin if Price < LowPrice then LowPrice = Price ; if Price > HighPrice then HighPrice = Price ; if MarketPosition < 1 and Price >= LowPrice * RetraceFctrUp then begin Buy this bar on Close ; HighPrice = Price ; end else if MarketPosition > -1 and Price <= HighPrice * RetraceFctrDn then begin Sell Short this bar on Close ; LowPrice = Price ; end ; end ;