Dear all,
The code attached is used to detect the number of peaks and troughs in the current chart(the chart I used the EURUSD of period 1 hour) . But the scripts always alerts "0 peaks and 0 troughs" at the end of the script while I can clearly see the peaks and trough on the chart detected by the zigzag indicator. Could someone figure out what is the problem with hte code or how should tackle this issue?
- Triangle detector - Pbl with ZigZag
- Indicators: Harmonic Pattern Finder V2
- Using iCustom function of the ZigZag indicator to close open trades when a new peak or trough is form
tzm:
Dear all,
The code attached is used to detect the number of peaks and troughs in the current chart(the chart I used the EURUSD of period 1 hour) . But the scripts always alerts "0 peaks and 0 troughs" at the end of the script while I can clearly see the peaks and trough on the chart detected by the zigzag indicator. Could someone figure out what is the problem with hte code or how should tackle this issue?
How many buffers does the "zigzag" Indicator have ? and what buffer number is MODE_HIGH ?
PeakPointValue= iCustom(sym,tf,"zigzag",12,5,3, MODE_HIGH, i);
iCustom() mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.
tzm:
Dear all,
The code attached is used to detect the number of peaks and troughs in the current chart(the chart I used the EURUSD of period 1 hour) . But the scripts always alerts "0 peaks and 0 troughs" at the end of the script while I can clearly see the peaks and trough on the chart detected by the zigzag indicator. Could someone figure out what is the problem with hte code or how should tackle this issue?
Dear RaptorUK,
Many thanks for your prompt and effective reply. After going over the source code of the zigzag.mp4 in the release, I changed MODE_HIGH to be 1, and MODE_LOW to be 0. The output is what I am anticipating. In case it might be helpful to someone, I copied the right code here:
PeakPointValue= iCustom(sym,tf,"zigzag",12,5,3,1,i); //use 1 directly instead of MODE_HIGH. to get the peak point value of the zigzag indicator. TroughPointValue= iCustom(sym,tf,"zigzag",12,5,3,0,i);//use 0 directly instead of MODE_LOW to get the trough point value of the zigzag indicator....
Hi Tao,
Did you manage to get this working?
Im trying to do the same.
Thanks.
- Simon Gniadkowski: How many buffers does the "zigzag" Indicator have ? and what buffer number is MODE_HIGH ?
ZZ only has one buffer segment. That means between highs and lows the values are zero (IIRC otherwise EMPTY_VALUE).
- Ash Hashimy: Did you manage to get this working? Im trying to do the same.
Do you really expect that people are still watching this thread after seven (7) years?
Don't resurrect old threads without a very good reason. A lot has changed since Build 600 and Higher. 2014.02.03
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register