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)?
The CLR_NONE constant is used to outline the absence of color, it means that the graphical object or graphical series of an indicator will not be plotted. This constant was not included into the Web-color constants list, but it can be applied everywhere where the color arguments are required. The EMPTY_VALUE constant usually corresponds...
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)?
2147483647is
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...
Used with array functions. Indicates that all array elements will be processed. Means the number of items remaining until the end of the array, i.e., the entire array will be processed The NULL constant can be assigned to a variable of any simple type or to an object structure or class pointer. The NULL assignment for a string variable means...
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?
NOENEEL NAVEEN SHARMA: , 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?
The indicator is on the chart, just invisible as EAs have no eyes.
Unless the indicator has been made a resource of the EA, it needs to be installed.
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.
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.