This code draws the Weis wave (or Wyckoff wave) on the price line and print the volume traded on the up or down leg. It comes from the book “trades about to happen”. For whoever likes to use Wyckoff it will be useful.
The code allows you to chose ATR (with Wilder’s average/SMA/EMA/WMA..) or a traditional box. When the box cell is zero the code uses automatically the ATR.
Blue skies!!!
//parameters :
//MM=0
//periodo=14
//box=0 (in case the boxsize has to be based on ATR) or any other value for traditional computation
//coeff=1
if box=0 then
boxsize = coeff*average[periodo,MM](tr)
else
boxsize=box
endif
once topprice = close
once bottomprice = close - boxsize
once barold=0
once posold=close
if barindex>2*periodo then
if (close > topprice) THEN
valup=round((close-topprice)/boxsize)+1
topprice=topprice + valup*boxsize
bottomprice = topprice - boxsize
up=1
down=0
ELSIF (close < bottomprice ) THEN
valdown=round((bottomprice-close)/boxsize)+1
bottomprice = bottomprice - valdown*boxsize
topprice = bottomprice + boxsize
up=0
down=1
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
//calcolo linee zig zag
//trend up
if up=1 then
if up[1]=0 then
drawsegment(barold,posold,barnew,posnew) coloured (250,0,0)
drawtext("#downvol#",barnew,posnew*0.995) coloured (250,0,0)
barold=barnew
posold=posnew
upvol=0
downvol=0
endif
if close>posnew then
posnew=high
barnew=barindex
endif
upvol=upvol+round(volume/1000)
endif
//trend down
if down=1 then
if down[1]=0 then
drawsegment(barold,posold,barnew,posnew) coloured (250,0,0)
drawtext("#upvol#",barnew,posnew*1.005) coloured (0,0,210)
barold=barnew
posold=posnew
upvol=0
downvol=0
endif
if close<posnew then
posnew=low
barnew=barindex
endif
downvol=downvol+round(volume/1000)
endif
endif
RETURN
You must be logged in to post a comment.
Hi Real Pro, this indicator assists novices of the Wyckoff system. Wyckoff himself thought this technique and he was using it with ticker tape. Weiss adapted this system to various timeframe charts. The system helps only the trader in his decision making since the Wyckoff system is a pure discretionary system. if you are planning to use this indicator for AT I think you might be disappointed.
Hi gabri, I know this, yet I am not familiar with coding of indicators. So my question was in fact, is it possible to have a separate indicator for the accumulated volume. thanks
Hi gabri, sorry for my late response. Weis Wave comes also wit accumulative volume on a separate indicator window using vertical bar, showing the accumulated volume on each wave, day by day. If you still don't understand me, look at this link - https://files.constantcontact.com/d491ca79201/26b1b1b7-8d3c-44bb-b04a-4c03f48f30a1.pdf. Thanks in advance.
I would be, at least for me, a good idea if you can draw the accumulative wave of volumes with the same parameters. Thanks in advance.
hi Gabri, I just came across the wyckoff method and was looking for the weiss wave indicator for PRT and found your post. knowing nothing elses about how this indicator is calculated....how should I define the following parameters in your code? //parameters : //MM=0 //periodo=14 //box=0 (in case the boxsize has to be based on ATR) or any other value for traditional computation //coeff=1 any guidance is appreciated! thanks in advance, Tatie