Hi,
i try to write an EA and get the values from DT-ZigZag-Lauer indicator with following code:
But my arrows differ from the arrows (dots) of the EA (See Screenshot).
What's wrong in my code.
thanks in advance.
Are you passing ALL the extern variable in your iCustom call or just some of them ?
Yes, i pass all external variables:
Indicator contains only these 2:
//---- input parameters extern int depth=5; extern int GrossPeriod=240;
...added screenshot in post
Yes, i pass all external variables:
Indicator contains only these 2:
...added screenshot in post
What value is held in the buffer when there is no dot ?
EMPTY_VALUE ?
https://docs.mql4.com/constants/special
EMPTY_VALUE | 0x7FFFFFFF | Default custom indicator empty value. |
What value is held in the buffer when there is no dot ?
If there is no dot, the value contains 0.00000000.
I think there is everytime a dot (Buy or Sell).
If there is no dot, the value contains 0.00000000.
I think there is everytime a dot (Buy or Sell).
OK, the Indicator code sets the buffer entry to 0.0 . .
if ( iClose(NULL,0,i+1)<=zigzag1 ) ExtMapBuffer2[i]=zigzag1; else ExtMapBuffer2[i]=0.0; if ( iClose(NULL,0,i+1)>=zigzag1 ) ExtMapBuffer1[i]=zigzag1; else ExtMapBuffer1[i]=0.0;
Maybe you are having double comparison issues . . .
try changing these lines . . .
if (Lauer_BUY > 0.1) { // <--- change from 0 to 0.1 else if (Lauer_SELL > 0.1) { // <--- change from 0 to 0.1
and read this thread: Can price != price ?
There are 2 buffers . . . one for S one for R . . . when there is a red dot there is no blue dot and visa versa . . . so what is the value in the buffer when there is no dot ?
Ok, know what you mean :-)
If there is a red dot for SELL, then Lauer_BUY returns 0.00000000.
If there is a blue dot for BUY, then Lauer_SELL returns 0.00000000.
I have attached the indicator file...
OK, the Indicator code sets the buffer entry to 0.0 . .
Maybe you are having double comparison issues . . .
try changing these lines . . .
if (Lauer_BUY > 0.1) { // <--- change from 0 to 0.1 else if (Lauer_SELL > 0.1) { // <--- change from 0 to 0.1
The indicator is repainting
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
i try to write an EA and get the values from DT-ZigZag-Lauer indicator with following code:
But my arrows differ from the arrows (dots) of the EA (See Screenshot).
What's wrong in my code.
thanks in advance.