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

Notification

Icon
Error

Options
Go to last post Go to first unread
Topkat  
#1 Posted : Wednesday, October 19, 2005 9:09:24 PM(UTC)
Topkat

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 11/10/2004(UTC)
Posts: 31

Jose, thank you for this indicator. Is it possible to do an exploration for buys/sells on an indicator (such as RSI)? I tried using the Zig(RSI(14),4,$) command, but the peaks and troughs were marked differently than when I plugged these parameters into your indicator (dropping the P variable on the RSI(14)). Does dropping the P variable on an indicator still use the closing price for peaks/troughs? I think I got lost following your logic. I am aware of the dynamic nature of the last leg... Thank you.
Jose  
#2 Posted : Thursday, October 20, 2005 12:37:37 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
TopKat, it's best to stay away from the "P" variable when using explorations - it can be confusing if the wrong plot is selected. To replace price by an indicator, just replace the "pr" variable in the original formula, thus: [code:1:ef25d4fa16] { Complete ZigZag-based indicator set - RSI(14)} { Allows use of points in Peak/Trough functions} { ©Copyright 2005 Jose Silva The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { User inputs } ch:=Input("Minimum reversal amount", .001,100000,4); method:=Input("Method: [1]$ points, [2]% percent",1,2,1); Nth:=Input("Nth Peak/Trough",1,100,1); pds:=Input("RSI periods",1,260,14); plot:=Input("Peaks/Troughs: [1]Values, [2]Signals, [3]ZigZag",1,3,3); { Indicator } pr:=RSI(pds); { Zig Zag } zzPts:=Zig(pr,ch,$); zzPer:=Zig(pr,ch,%); zz:=If(method=1,zzPts,zzPer); { Peak/Trough values } pkPts:=Peak(Nth,zzPts,.001); pkVal:=If(method=1,pkPts,Peak(Nth,pr,ch)); trPts:=Trough(Nth,zzPts,.001); trVal:=If(method=1,trPts,Trough(Nth,pr,ch)); { Peak/Trough signals } pkPts:=PeakBars(Nth,zzPts,.001)=0; pk:=If(method=1,pkPts,PeakBars(Nth,pr,ch)=0); trPts:=TroughBars(Nth,zzPts,.001)=0; tr:=If(method=1,trPts,TroughBars(Nth,pr,ch)=0); { Plot ZigZag/Peaks/Troughs on chart, Peak & Trough signals in own window } If(plot=1,pkVal,If(plot=2,pk,zz)); If(plot=1,trVal,If(plot=2,-tr,zz)) [/code:1:ef25d4fa16] jose '-)
Users browsing this topic
Guest (Hidden)
Similar Topics
ZigZag-based indicator toolkit (Advanced Coding Techniques)
by Jose 10/18/2005 11:23:24 PM(UTC)
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.