[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 282
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
Gentlemen, teach how to take adivergence signal from an indicator(FX5_Divergence_V2.1.mq4) to an EA.
Buffers 2 and 3 of the indicator give out EMPTY_VALUE.
Gentlemen, teach how to take adivergence signal from an indicator(FX5_Divergence_V2.1.mq4) to an EA.
Buffers 2 and 3 of the indicator give out EMPTY_VALUE.
Did I write you a script? It has everything in it. Instead of outputting a message with Alert, write your processing. You can write eight in DoubleToString() instead of six decimal places if it outputs zeros. In any case, the signals are present and the script reads them. Apply some mind and effort.
The empty values of the buffers with arrows are filled instead of zeros with values EMPTY_VALUE numerically equal to 2147483647. Where there are arrows, the values are different, e.g. 0.000031.
We have to filter out "empty" values programmatically, because they look like the number 2147483647 in comparison.
For instance, I do it this way and it works. Who is smarter, can make it more beautiful.
What a stubborn man. Let me explain it to him again on my fingers.
Empty values of buffers with arrows are filled instead of zeros with values EMPTY_VALUE numerically equal to 2147483647. Where there are arrows, the values are different, e.g. 0.000031.
We have to filter out "empty" values programmatically, because they look like the number 2147483647 in comparison.
For instance, I do it this way and it works. Who is smarter, can make it more beautiful.
Now the person will write that buffers 2 and 3 output only zeros :)))
Man, such a simple logic: if buffer's value is NOT equal to EMPTY_VALUE, it means there is an arrow on this bar and therefore a signal.
And how to present this empty value and what to compare it with is a matter of taste.
Everything's a bloody mess here...
To the island!!! :)
I have the same numbers (via Expert Advisor) but the Data window shows EMPTY_VALUE! Is there any way to fix this?
Stubborn man. Let me explain it to him again on my fingers.
The empty values of the buffers with arrows are filled with EMPTY_VALUE numerically equal to 2147483647 instead of zeros. Where there are arrows, the values are different, e.g. 0.000031.
We have to filter out "empty" values programmatically, because they look like the number 2147483647 in comparison.
For instance, I do it this way and it works. Who is smarter, can make it more beautiful.
understood roughly.
To artmedia70.
I really couldn't use the script. I tried to do almost the same as granit77 ,but it didn't work either.
If(buy==EMPTY_VALUE) buy=0.0 ; - the result is always "0". I have Alerts coming from the indicator but the Alert attached to the Expert Advisor is not working.
Okay, thanks, I will continue to "suffer" ...)))
To artmedia70.
I really couldn't use the script. I tried to do almost the same as granit77 ,but it didn't work either.
If(buy==EMPTY_VALUE) buy=0.0 ; - the result is always "0". I have Alerts coming from the indicator but the Alert attached to the Expert Advisor is not working.
Okay, thanks, I will continue to "suffer" ...)))
I have the same numbers (via EA), but the Data window shows EMPTY_VALUE! Is there any way to fix this?
I.e. :
string val;
if(buffer value==EMPTY_VALUE) val="EMPTY_VALUE";
But if(buffer value!=EMPTY_VALUE) val=DoubleToString(buffer value, 8);
and display the value of variable val instead of the buffer value.
For example: Comment ("Value = ", val);