
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
Look at my earlier post - check return values, verify if they are EMTPY_VALUE. Also, follow what they said and use 0 IF the arrows appear at bar 0.
Ok, i'll work out how to do that later tonight. Need to take kids to practice now.
Thanks very much for your help guys. Ended up being a stupid mistake on my part and not having the spelling right. I can now see why it was failing, it's not returning an empty_value when not correct, rather a 1 (true) when it is valid. So my test (below) was incorrect in any case.
I'll correct this if statement later tonight. Can I convert to a boolean like in python or is it old school test like (var == 1.0)?
Thanks very much for your help guys. Ended up being a stupid mistake on my part and not having the spelling right. I can now see why it was failing, it's not returning an empty_value when not correct, rather a 1 (true) when it is valid. So my test (below) was incorrect in any case.
I'll correct this if statement later tonight. Can I convert to a boolean like in python or is it old school test like (var == 1.0)?
2147483647 is EMPTY_VALUE, so your comparison is valid. Check your bar index (i.e. last parameter of iCustom()) instead.
bool(EMTPY_VALUE) and bool(1) will give you true...
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon.
Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon.
Aaah apologies, still trying to get used to this forum layout. I'm used to VB4.x sites.
I've got orderopen code in now but getting this error: Trade Disabled so will look at that today. It's not disabled as i have another EA on a different chart that is doing orders fine and autotrade is enabled.
Also, when using iCustom to pull buffer data from an indicator, is that indicator no longer required to be attached to the chart? For example, can i simply use the EA without the indicator now on chart?
Use the publicly released code - Expert Advisors and Automated Trading - MQL5 programming forum
Resources - MQL4 programs - MQL4 Reference
Be aware that using resources is 40x times slower than using CIs directly.
A custom indicator as a resource - MQL4 programming forum 2019.11.26
Use the publicly released code - Expert Advisors and Automated Trading - MQL5 programming forum
Resources - MQL4 programs - MQL4 Reference
Be aware that using resources is 40x times slower than using CIs directly.
A custom indicator as a resource - MQL4 programming forum 2019.11.26
Ok, so when you say that the indicator is on the chart, does this hold true even if I do not manually add it to the chart? Is the EA when loading what loads the indicator? Sorry for asking the obvious, just wondering whether what I am doing atm is redundant -
1. Add indicator
2. Add EA (which uses iCustom and the indicator)
Or is it a case of, I only need to add the EA as by adding the EA, it will also add the indicator to the chart.