답변완료
수식 부탁드립니다
아래와 같은 수식을 예스랭귀지로 전환 부탁드립니다.
//PRC_BBands Stop | indicator
//30.03.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//translated from MT4 code
// --- settings
//Length=20 // Bollinger Bands Period
//Deviation=2 // Deviation
//MoneyRisk=1.00 // Offset Factor
// --- end of settings
avg=average[Length]
dev=std[Length]*Deviation
smax = avg+dev
smin = avg-dev
if close>smax[1] then
trend=1
endif
if close<smin[1] then
trend=-1
endif
if trend>0 and smin<smin[1] then
smin=smin[1]
endif
if trend<0 and smax>smax[1] then
smax=smax[1]
endif
bsmax=smax+0.5*(MoneyRisk-1)*(smax-smin)
bsmin=smin-0.5*(MoneyRisk-1)*(smax-smin)
if(trend>0 and bsmin<bsmin[1]) then
bsmin=bsmin[1]
endif
if(trend<0 and bsmax>bsmax[1]) then
bsmax=bsmax[1]
endif
if trend>0 then
TrendLine=bsmin
r=127
g=255
drawtext("•",barindex,bsmin,Dialog,Standard,10) coloured(r,g,0)
if trend[1]<0 then
drawtext("•",barindex,bsmin,Dialog,Standard,22) coloured(r,g,0)
endif
endif
if trend<0 then
TrendLine=bsmax
r=255
g=165
drawtext("•",barindex,bsmax,Dialog,Standard,10) coloured(r,g,0)
if trend[1]>0 then
drawtext("•",barindex,bsmax,Dialog,Standard,22) coloured(r,g,0)
endif
endif
RETURN TrendLine coloured(r,g,0) style(line,2) as "BBands stop Trend"
2023-05-19
699
글번호 169140
지표
답변완료
수식부탁드립니다..
항상 답변 해주시느라 고생이 많습니다.
예스스탁 게시물에서 찾아보는데 찾기가 쉽지 않네요.
1. 볼린져밴드 수식에서 이평선처럼 종가를 시가로 바꿀수 있게 지표를 만들수 있을까요?
- 종가를 시가로 바꿔보니 이평선만 바뀌고 볼밴 자체는 변함이 없네요.
- 시가, 고가, 저가, 종가, (고가+저가)/2
- 단순이평, 지수이평, 가중이평 이런기능
- 종가 일때는 실시간 챠트를 보면 계속 지표값이 변합니다.
2. 시스템식도 부탁드립니다.
1. 볼밴 종가 상단선 돌파 + 스토캐스틱이 과열권(80%) 이탈시 매도
2. 볼밴 종가 하단선 이탈 + 스토캐스틱이 과열권(20%) 돌파시 매수
2023-05-19
856
글번호 169129
지표