logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Espartano  
#1 Posted : Friday, April 12, 2019 2:37:12 PM(UTC)
Espartano

Rank: Newbie

Groups: Registered Users, Subscribers
Joined: 7/26/2016(UTC)
Posts: 5
Location: Rua Sao Vicente, 110/202

I'm trying to use the ZigZag Validity Indicator (by Spyros Raftopoulos) in the 100 Ticks Charts of S&P500.

However, sometimes this indicator does't appear.  I think that the problem is the limit of 65.500 ticks which involves that I just can plot 65.500/100 = 655 bars. How can I can to solve this problem ?

I didn't get to attach the Metastock image of chart. I'm using the code below:

vr  := C; amnt:= 0.15; zz0 := Zig(vr,amnt,%); zz1 := Ref(zz0,-10); zz2 := Ref(zz0,-20); tr := ValueWhen(1,zz0>zz1 AND zz1<zz2, zz1); pk := ValueWhen(1,zz0<zz1 AND zz1>zz2, zz1); PU := tr+Abs(tr)*amnt/100; PD := pk-Abs(pk)*amnt/100; res:=If(vr>=PU AND zz0>zz1,1, If(vr<=PD AND zz0<zz1,-1,0)); res:=If(res<>0,res,ValueWhen(1,res<>0,res)); res​​​​​​​

MS Support  
#2 Posted : Wednesday, April 17, 2019 5:08:00 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,512

Thanks: 44 times
Was thanked: 119 time(s) in 115 post(s)
Originally Posted by: Espartano Go to Quoted Post

I'm trying to use the ZigZag Validity Indicator (by Spyros Raftopoulos) in the 100 Ticks Charts of S&P500.

However, sometimes this indicator does't appear.  I think that the problem is the limit of 65.500 ticks which involves that I just can plot 65.500/100 = 655 bars. How can I can to solve this problem ?

I didn't get to attach the Metastock image of chart. I'm using the code below:

vr  := C; amnt:= 0.15; zz0 := Zig(vr,amnt,%); zz1 := Ref(zz0,-10); zz2 := Ref(zz0,-20); tr := ValueWhen(1,zz0>zz1 AND zz1<zz2, zz1); pk := ValueWhen(1,zz0<zz1 AND zz1>zz2, zz1); PU := tr+Abs(tr)*amnt/100; PD := pk-Abs(pk)*amnt/100; res:=If(vr>=PU AND zz0>zz1,1, If(vr<=PD AND zz0<zz1,-1,0)); res:=If(res<>0,res,ValueWhen(1,res<>0,res)); res​​​​​​​

Hello,

The probability of meeting the criteria might increase with more data but I was able to get the indicator to plot with a fairly low amount of data. It may just be a case of the min % movement not being met within the time frame. When I tried the formula using "Load Minimum Records" in our Explorer tool (you cannot use Tick Bars here) it ended up loading 44 records. Some did result in NA values, others reported a value.

That said, there is no way to bring in more data than the chart will allow. Using the Load Maximum Records (newer versions) or 65500 Load Options in older versions is the maximum allowable.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.