[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] ZIG peak and trough detection



PureBytes Links

Trading Reference Links



Hi Zoris
fl showing error after adding your lines
it says perc is not acceptable
 
Please, can you correct this code lines?
If there are two options, kindly post both codings in full, and oblige
Thanks in advance,
regards
rvlv
--------------------------------------------------------------------code-------------------
P = ParamField( "Price field" );
change = Param("% change",5,0.1,25,0.1);
//Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
 
//added this extra code as per Zoris M Schuller
//request lines description
//Could someone help me with the AFL code for Zig function Peak AND Trough detection?
//I want to check if the last Zig value is a Peak OR a Trough.
//do I need to use loop code OR is there a way to use LastValue to detect this condition?
 
 
 
//for ZIGHL afl go to (amongst others): Joris Schuller; Sat 11/07/2009 10:25 AM
//change =ZigPerc;
//pkbars=PeakBars(H,ZigPerc); //if you use the ZIGHL formula, otherwise replace H by C when using AB-Zig
pkbars=PeakBars(H, Change);
trbars=TroughBars(L, Change); //if you use the ZIGHL formula, otherwise replace L by C when using AB-Zig
Plot( Zig(H, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
 
//if (pkbars<trbars); Peak, otherwise Trough;//this line gives error
-----------------------------------------------------------------------------------------------------------------------------------------------

--- On Tue, 11/17/09, Joris Schuller <jschuller@xxxxxxxxxxx> wrote:

From: Joris Schuller <jschuller@xxxxxxxxxxx>
Subject: RE: [amibroker] ZIG peak and trough detection
To: amibroker@xxxxxxxxxxxxxxx
Date: Tuesday, November 17, 2009, 7:36 PM

 

For ZIGHL afl go to (amongst others): Joris Schuller; Sat 11/07/2009 10:25 AM

pkbars=PeakBars(H,ZigPerc); //if you use the ZIGHL formula, otherwise replace H by C when using AB-Zig

trbars=TroughBars(L,ZigPerc); //if you use the ZIGHL formula, otherwise replace L by C when using AB-Zig

if pkbars<trbars: peak, otherwise trough

From: amibroker@xxxxxxxxx ps.com [mailto:amibroker@ yahoogroups. com] On Behalf Of Richard
Sent: Tuesday, November 17, 2009 7:12 PM
To: amibroker@xxxxxxxxx ps.com
Subject: [amibroker] ZIG peak and trough detection

 

 

Hello, Could someone help me with the AFL code for ZIG function peak and trough detection?
I want to check if the last ZIG value is a Peak or a Trough.
Do I need to use loop code or is there a way to use LastValue to detect this condition?

Regards
Richard

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.67/2506 - Release Date: 11/16/09 07:43:00



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___