PureBytes Links
Trading Reference Links
|
Hi Jose, Thanks.
On 1/6/06, Jose Silva <josesilva22@xxxxxxxxx> wrote:
Most indicators are highly correlated to price, but you could try overlapping peak/trough signals and get some divergence signals this
way.
Try the indicator below, and note that ZigZag-based signals are dynamic in the last leg. Reference the indicator for your Expert signals.
====================== Peak-Trough divergence
====================== ---8<--------------------
{©Copyright 2006 Jose Silva. For personal use only. http://www.metastocktools.com }
{ User Inputs }
perP:=Input("Price %minimum change",.01,100,2); perI:=Input("Indicator %minimum change", .01,1000,3); lap:=Input("Overlap peak/troughs by x periods", .1,260,2);
{ Price }
x:=C;
{ Price Peaks/Troughs } pkPr:=Alert(PeakBars(1,x,perP)=0,lap); trPr:=Alert(TroughBars(1,x,perP)=0,lap); PkTrPr:=pkPr-trPr;
{ Sample indicator } ind:=MACD();
{ Indicator Peaks/Troughs }
pkInd:=Alert(PeakBars(1,ind,perI)=0,lap); trInd:=Alert(TroughBars(1,ind,perI)=0,lap); PkTrInd:=pkInd-trInd;
{ Price/Indicator Peak-Trough divergence } diverg:=-PkTrInd=PkTrPr AND PkTrPr<>0;
{ Plot in own window } diverg
---8<--------------------
Another possible solution would be to compare the +/- slope of the two ZigZags, rather than their peaks/troughs, but this will yield many signals.
jose '-) http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, "bvpr1" <
investman@xxxx> wrote: > > Hi, > I have a zigzag of price in one window and zigzag of an indicator on > the other window. I would like to write an expert which should put > an arrow where ever the peaks or troughs are diverging. Is it
> possible. > Thanks
------------------------ Yahoo! Groups Sponsor --------------------~--> Try Online Currency Trading with GFT. Free 50K Demo. Trade 24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM --------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
YAHOO! GROUPS LINKS
|