커뮤니티
변환 좀 부탁드리겠습니다.
2018-05-22 09:07:06
242
글번호 119081
아래 내용을 예스트레이더용으로 변환 좀 부탁드리겠습니다.
// --- parameters
percentVariation = 3
zz = ZigZag[percentVariation](close)
peak = zz<zz[1] and zz[1]>zz[2]
tough = zz>zz[1] and zz[1]<zz[2]
if color=1 then
cumV = cumV+volume
else
cumV = cumV-volume
endif
if peak then
lastpeakvol = peakvol
lastpeakhigh = peakhigh
lastpeakbar = peakbar
peakvol = cumV[1]
peakhigh = high[1]
peakbar = barindex[1]
cumV = -Volume
color = -1
r=255
g=0
elsif tough then
lasttoughvol = toughvol
lasttoughlow = toughlow
lasttoughbar = toughbar
toughvol = cumV[1]
toughlow = low[1]
toughbar = barindex[1]
cumV = Volume
color = 1
r=0
g=255
endif
//divergences finder
divbear=0
divbull=0
//bearish divergence
if(peak) then
if peakhigh>lastpeakhigh and peakvol<lastpeakvol then
divbear = peakvol
drawsegment(lastpeakbar,lastpeakvol,peakbar,peakvol) coloured(r,g,0)
drawarrowdown(peakbar,peakvol) coloured(r,g,0)
endif
endif
//bullish divergence
if(tough) then
if toughlow<lasttoughlow and toughvol<lasttoughvol then
divbull = toughvol
drawsegment(lasttoughbar,lasttoughvol,toughbar,toughvol) coloured(r,g,0)
drawarrowup(toughbar,toughvol) coloured(r,g,0)
endif
endif
return cumV coloured(r,g,0) style(histogram), divbear coloured(255,100,0) style(histogram), divbull coloured(100,255,0) style(histogram)
답변 1
예스스탁 예스스탁 답변
2018-05-23 15:26:04
안녕하세요
예스스탁입니다.
올려주신 언어의 수식은 사용해본 경험이 없어
정확한 내용판단이 되지 않아
예스랭귀지로 변경을 해드릴수 없습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 플로스트 님이 쓴 글입니다.
> 제목 : 변환 좀 부탁드리겠습니다.
> 아래 내용을 예스트레이더용으로 변환 좀 부탁드리겠습니다.
// --- parameters
percentVariation = 3
zz = ZigZag[percentVariation](close)
peak = zz<zz[1] and zz[1]>zz[2]
tough = zz>zz[1] and zz[1]<zz[2]
if color=1 then
cumV = cumV+volume
else
cumV = cumV-volume
endif
if peak then
lastpeakvol = peakvol
lastpeakhigh = peakhigh
lastpeakbar = peakbar
peakvol = cumV[1]
peakhigh = high[1]
peakbar = barindex[1]
cumV = -Volume
color = -1
r=255
g=0
elsif tough then
lasttoughvol = toughvol
lasttoughlow = toughlow
lasttoughbar = toughbar
toughvol = cumV[1]
toughlow = low[1]
toughbar = barindex[1]
cumV = Volume
color = 1
r=0
g=255
endif
//divergences finder
divbear=0
divbull=0
//bearish divergence
if(peak) then
if peakhigh>lastpeakhigh and peakvol<lastpeakvol then
divbear = peakvol
drawsegment(lastpeakbar,lastpeakvol,peakbar,peakvol) coloured(r,g,0)
drawarrowdown(peakbar,peakvol) coloured(r,g,0)
endif
endif
//bullish divergence
if(tough) then
if toughlow<lasttoughlow and toughvol<lasttoughvol then
divbull = toughvol
drawsegment(lasttoughbar,lasttoughvol,toughbar,toughvol) coloured(r,g,0)
drawarrowup(toughbar,toughvol) coloured(r,g,0)
endif
endif
return cumV coloured(r,g,0) style(histogram), divbear coloured(255,100,0) style(histogram), divbull coloured(100,255,0) style(histogram)
다음글
이전글