Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-28-2006, 02:50 AM
Junior Member
 
Join Date: May 2006
Posts: 2
Kesh is on a distinguished road
Arrow ZigZag

How would I go about getting data from the default custom indicator "ZigZag" in my expert advisor? I know how to use the iCustom function, but don't know what to use for the last 3 variables.

Any help would be greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 05-28-2006, 10:05 AM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 396
elihayun is on a distinguished road
Quote:
Originally Posted by Kesh
How would I go about getting data from the default custom indicator "ZigZag" in my expert advisor? I know how to use the iCustom function, but don't know what to use for the last 3 variables.

Any help would be greatly appreciated.
the last patameter to iCustom is the bar shift, the one before it is the indicator buffer (starting from 0).
Before the last 2 parameters (that I just describe, u enter the values of all the extern values of the indicator. In your case look at the indicator and find the lines
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];


as u can see there are 3 values and 2 buffers.

the line of code should look like:

double zzUpper = iCustome(NULL,0,"ZigZag",12,5,3,0,0); // from 1st buffer
double zzLower = iCustome(NULL,0,"ZigZag",12,5,3,1,0); // from 2nd buffer

Most of the values will be 0 (when there is no zigzag value)

Hope it will help you

Eli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 05-28-2006, 10:57 PM
Junior Member
 
Join Date: May 2006
Posts: 2
Kesh is on a distinguished road
Quote:
Originally Posted by elihayun
the last patameter to iCustom is the bar shift, the one before it is the indicator buffer (starting from 0).
Before the last 2 parameters (that I just describe, u enter the values of all the extern values of the indicator. In your case look at the indicator and find the lines
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];


as u can see there are 3 values and 2 buffers.

the line of code should look like:

double zzUpper = iCustome(NULL,0,"ZigZag",12,5,3,0,0); // from 1st buffer
double zzLower = iCustome(NULL,0,"ZigZag",12,5,3,1,0); // from 2nd buffer

Most of the values will be 0 (when there is no zigzag value)

Hope it will help you

Eli
Thanks for your help!

I have gotten my expert advisor to output data from the indicator, but am having trouble making sense of it. It usually outputs 0 for both upper and lower, but sometimes it displays a value (i.e. 1.3423) for the upper and occasionaly the lower. When does it output data? What is the diffrence beetween upper and lower?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 05-29-2006, 06:01 AM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 396
elihayun is on a distinguished road
ZigZag is a serial of upper and lower values. If u see a line from one price to another, then in the indicator you will get the lower price in the "lowpricebuffer" and the higher price in the "highpricebuffer" . So, between the low and high u get zeros.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 07-18-2007, 03:25 PM
Senior Member
 
Join Date: May 2007
Posts: 178
dvarrin is on a distinguished road
Hi,

I want to code an EA based on the Zigzag indicator. So if I want to know the last high or the last low, then I can simply create a loop, increasing the shift, and stop as soon as I get a value? Is that right?

What do the ZigzagBuffer, HighMapBuffer and LowMapBuffer contain? in the example above, mode should be 1 and 2 instead of 0 and 1 for the mode, no?

cheers,
Daniel

Last edited by dvarrin; 07-18-2007 at 03:32 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 07-18-2007, 10:34 PM
Senior Member
 
Join Date: Dec 2006
Location: Ukraine
Posts: 513
Shinigami is on a distinguished road
Please somebody who knows the code for it, simply post the code for the usage of ZigZag to find last 6 values of ZigZag custom indicator. I think it will be interesting to many. 6 because we ignore the last value (it is being redrawn) and need 2 last highs and 2 last lows. 6-th value just in case.
__________________
MQL4 programming is easy ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 07-22-2007, 07:04 AM
Junior Member
 
Join Date: Oct 2006
Posts: 1
zsqabca is on a distinguished road
zigzag

Quote:
Originally Posted by Kesh View Post
How would I go about getting data from the default custom indicator "ZigZag" in my expert advisor? I know how to use the iCustom function, but don't know what to use for the last 3 variables.

Any help would be greatly appreciated.
int n, i;
double zag, zig;
i=0;
while(n<2)
{
if(zig>0) zag=zig;
zig=iCustom(NULL, 0, "ZigZag", 0, i);
if(zig>0) n+=1;
i++;
}now you have two numbers zig -- last value and zag -- value before that
if(zag>zig) indicator shows down
if(zig>zag) indicator shows up
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 07-22-2007, 07:26 AM
bigbear3391's Avatar
Senior Member
 
Join Date: Dec 2006
Location: California USA!!!
Posts: 374
bigbear3391 is on a distinguished road
Zig-zag Ea

Hey There,

I to am trying to find someone to help me build an EA with a non-lagging zig-zag indicator & a zig-zag pointer.

I have been using them manually with pretty good results.

The can be used on short term charts but are way better on 4 hour or higher.

I can show you how its works if you are interested.

Any reply would be greatly appreciated.


Bear-
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 07-22-2007, 10:04 AM
hexadecimal's Avatar
Member
 
Join Date: Apr 2006
Posts: 61
hexadecimal is on a distinguished road
Quote:
Originally Posted by bigbear3391 View Post
Hey There,

I to am trying to find someone to help me build an EA with a non-lagging zig-zag indicator & a zig-zag pointer.

I have been using them manually with pretty good results.

The can be used on short term charts but are way better on 4 hour or higher.

I can show you how its works if you are interested.

Any reply would be greatly appreciated.


Bear-

I`ve been always a fan of Zig Zag indicators can you pls share Non lagging Zig Zag indicator. Thx.
__________________
My Martingale Expert Advisor !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
zigzag, ZigZag Pointer, zigzag forex, zig zag, ZIG ZAG FOREX, forex zigzag, zig zag indicator, zig zag pointer, zigzag expert advisor, icustom zigzag


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zigzag indicators newdigital Indicators - Metatrader 4 259 10-27-2009 07:19 PM
DT-Zigzag EA pitch67 Suggestions for Trading Systems 16 03-20-2008 04:14 PM
Zigzag newdigital General Discussion 51 03-06-2008 11:21 AM
ZigZag EA SeeCube Metatrader 4 2 01-26-2007 12:36 PM


All times are GMT. The time now is 09:21 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.