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
Somehow the Print function is getting suppressed so I can't diagnose this any further.
Your iCustom comparisons are always true that much I know.
I'm not sure if this is why there is some conflict in milliseconds for the Print function that is not being read by the terminal or something else.
I can comment/omit your comparisons and Print function calls anything I want as it should, but when inserting your code only a few lines of Print calls can be read, and NO print calls withing the code block comparison are being read not even the GetLastError.
GetLastError does read in the tester but not the print calls. I'm not sure why.
when you run the indicator in an expert, did you have the same issues with the sell?
One thing for sure is that your iCustom comparison is returning EMPTY_VALUE.
To work around this you can do something like this perhaps
This will trade both directions, but I'm not sure it's the value your wanting. You have to double check this against the indicator.
Anyhow this works on the demo and trades both directions as it should.
IE:
There were multiple problems with buy sell and Print function errors.
One thing for sure is that your iCustom comparison is returning EMPTY_VALUE.
To work around this you can do something like this perhaps
This will trade both directions, but I'm not sure it's the value your wanting. You have to double check this against the indicator.
Anyhow this works on the demo and trades both directions as it should.
IE:
I am think that this error is only on the tester, because if it works on Demo then why the problem on tester?
The for loops I provided do not produce errors; and trade in both directions for the tester and the demo.
I am not exactly sure which part of your code the terminal didn't like since the Print returns were different on the demo and the tester. Some Print returns were surpress as well and I was expecting to get a read of the return.
Reposting your referenced code for reference:
So here is what I can say about the code you posted regarding indicator.mql4
I can say that iCustom is almost always receiving an EMPTY_VALUE in the buffer for both buffers all the time.
So in your code when you compare iCustom<Low[1] or iCustom >High[1] here is what your comparing:
EMPTY_VALUE<Low[1] always false except when the buffer gets a value other then EMPTY_VALUE.
or
EMPTY_VALUE>High[1] always true, except when buffer gets a value other then EMPTY_VALUE
NOTE:
EMPTY_VALUE == 2147483647 it will always be greater then High[1] and never greater then Low[1] generally speaking.
You can use the Print function to see this for yourself.
This is mostly the problem with your code.
So the question is:
Why exactly is your posted code giving the results or reaction that we are seeing in the terminal ?
I am not experienced enough to understand why it's reacting this way but this doesn't change the dysfunction of the code that we can see.
Why this false condition can BUY while the true condition seems to open and close for reasons I don't completely understand but only see that the code blocks are dysfunctional.
My idea:
I assume this code is confusing the interpreter somehow.
Understanding why it's reacting this way is not as important as understanding the broken code and fixing it.
Someone might sort the reasoning behind the results later, but for now you can change the code so that your not comparing something with EMPTY_VALUES unless you intend to compare with EMPTY_VALUES.
I hope this helps for now,
Perhaps someone can explain why the interpreter is doing what it's doing but for now you should have what you need to fix your codes.
There were multiple problems with buy sell and Print function errors.
One thing for sure is that your iCustom comparison is returning EMPTY_VALUE.
To work around this you can do something like this perhaps
This will trade both directions, but I'm not sure it's the value your wanting. You have to double check this against the indicator.
Anyhow this works on the demo and trades both directions as it should.
IE:
I tried you code above, see the results below, it picks trades continuously after each arrow,
is it same as your end
Thanks
@Agent86
Please can you help me with one last thing. This thing is making me go nut, help me run this indicator attached into an Ea from your end there and see if all works well. I tried here it was still same issue I'm having with others. Let me know if works well on your tester. it is an up and down arrow indicator
Thank you
I tried you code above, see the results below, it picks trades continuously after each arrow,
is it same as your end
Thanks
Yes that is what your coded does.
I posted the fix and explained why already.
Please read previous post with "for loops"
Also your Pcount.zip folder ONLY contains the .ex4 indicator. This .ex4 needs to be decompiled so you can get the .mq4 file.
Unless you have the mq4 file then you can post that instead.
Without the .mq4 file I can't see the code to determin iCustom requirements.
Just fyi.
Yes that is what your coded does.
I posted the fix and explained why already.
Please read previous post with "for loops"
Also your Pcount.zip folder ONLY contains the .ex4 indicator. This .ex4 needs to be decompiled so you can get the .mq4 file.
Unless you have the mq4 file then you can post that instead.
Without the .mq4 file I can't see the code to determin iCustom requirements.
Just fyi.
Hi @Agent86 and everyone, thanks for your support
I found let me say a temporary solution to the issue at hand for the iCustom function. I will include the code
Hi @Agent86 and everyone, thanks for your support
I found let me say a temporary solution to the issue at hand for the iCustom function. I will include the code
This above method works perfectly just the normal way
so what could be the problem for the "High" call not to work perfectly. recently I wrote some mql5 code and sent to someone the person was unable to use it and problem was due to Os 32bit and Os64 bit
My pc is 64 his own was 32, according to his explanation he said he could not update his mt5 to the latest due to the 32bit operating system and the Ea was built with the latest 64 bit mt5 update. now to get the issue solved he updated the system to a 64 bit and this same EA start working
with this now I am thinking as my mt4 version is on 32bit giving me this issue, could that be the problem
can any of the Admins or moderators confirm this just to be sure, because this issue just started all of a sudden and I can say it is not related to code problem or bugs but something more general, either My Pc, Os or the Mt4
Thanks