//1. (2*평균가-고가) 이하로 하락하면 매수 -> 역추세
//2. (2*평균가-2*저가+고가) 이상으로 상승하면 매수
-> 추세
//3. 직전2개봉의 최저가에서 손절매
//- (2*평균가-저가) 이상으로 상승하면 매도 -> 역추세
//- (2*평균가-2*고가+저가) 이하로 하락하면 매도 -> 추세
input : Period(20);
if C <= (2*ma(c,Period)-H) Then
buy();
if C >= (2*ma(c,Period)-(2*L+H)) Then
buy();
if MarketPosition() == 1 Then
exitlong("매수손절",atstop,min(L,L[1]));
if C >= (2*ma(c,Period)-L) Then
Sell();
if C <= (2*ma(c,Period)-(2*H+L)) Then
Sell();
if MarketPosition() == -1 Then
ExitShort("매도손절",atstop,Max(H,H[1]));
댓글 없음:
댓글 쓰기