Compilation errors enumerator identifier already defined
-
Hi,
everytime I try to compile my EA I keep getting this error message:
Compilation errors
'pr_close' - enumerator identifier already defined
'pr_open' - enumerator identifier already defined
'pr_high' - enumerator identifier already defined
'pr_low' - enumerator identifier already defined
'pr_median' - enumerator identifier already defined
'pr_typical' - enumerator identifier already defined
'pr_weighted' - enumerator identifier already defined
'pr_average' - enumerator identifier already defined
'pr_medianb' - enumerator identifier already defined
'pr_tbiased' - enumerator identifier already defined
'pr_haclose' - enumerator identifier already defined
'pr_haopen' - enumerator identifier already defined
'pr_hahigh' - enumerator identifier already defined
'pr_halow' - enumerator identifier already defined
'pr_hamedian' - enumerator identifier already defined
'pr_hatypical' - enumerator identifier already defined
'pr_haweighted' - enumerator identifier already defined
'pr_haaverage' - enumerator identifier already defined
'pr_hamedianb' - enumerator identifier already defined
'pr_hatbiased' - enumerator identifier already defined
'ma_sma' - enumerator identifier already defined
'ma_ema' - enumerator identifier already defined
'ma_dsema' - enumerator identifier already defined
'ma_dema' - enumerator identifier already defined
'ma_tema' - enumerator identifier already defined
'ma_smma' - enumerator identifier already defined
'ma_lwma' - enumerator identifier already defined
'ma_pwma' - enumerator identifier already defined
'ma_alxma' - enumerator identifier already defined
'ma_vwma' - enumerator identifier already defined
'ma_hull' - enumerator identifier already defined
'ma_tma' - enumerator identifier already defined
'ma_sine' - enumerator identifier already defined
'ma_linr' - enumerator identifier already defined
'ma_ie2' - enumerator identifier already defined
'ma_nlma' - enumerator identifier already defined
'ma_zlma' - enumerator identifier already defined
'ma_lead' - enumerator identifier already defined
'ma_ssm' - enumerator identifier already defined
'ma_smoo' - enumerator identifier already definedCould someone help me please? I searched on google and the forum but can't seem to find anything related to the problem.
Here is the link of my EA template. it's my first so If there are other condition I must change feel free to say.
https://fxdreema.com/shared/3S5VoxJQd
Thanks in advance!!!
-
Hi. All I can say is that the custom indicator has some bugs in its code, or perhaps the whole code is outdated.
I'm not an expert on custom indicators, in fact I never use indicators built by some random dude, because of problems like this
-
Thanks for your reply!!
Oh ok. I was already thinking something like that. because the other indicator I use didn't have this issues.
But if someone could fix this it would be great. Because I really love this indicator. I already tried to use another TDFI version but this one had the same problem
-
@hypnoise Well, it looks like that both indicators use the enum datatype for moving average type. I'd say if you have the soureces of one of them rename the datatype and reimport the indicator.
You may share the mq4 files and I could try by myself.
-
I'm sorry for my late reply.
https://drive.google.com/open?id=1xKE55qkqa0AP1GAh0ipHVE31nLxzd08-
here you find the indicators.I also tried to make a likewise EA with other indicators. these compile luckily but everytime I try in strategy tester the system doesnt work as it supposed to be.
simple strategy:
If the QQE is up and the tdfi shows an upward in the volatility = Buy // close when the QQE changes direction
for sell signals the opposite.
I dont know what im doing wrong in any of the systems. I wen thru the help and even changed the tutorial templates to my needs but all the ea's wont work like I want to. It must be something silly I forget to change or add.
Thanks in advance
-
@hypnoise I will take a look later today. If you have any updates on your project, please re-share it.
-
@hypnoise Okay, that was a tricky one. As stated before the issue is that both indicators use the same entities for enPrices and enMATypes. However, other than I thought before, it is not the enum datatype name itself, but each entity. The compiler complains for exampke that the entity pr_close is already defined. Changing the enumeration name did not help.
So the easiest solution I found was to import 1 of those indicators again into fxdreema and on the import screen delete the sections for enum datatypes enPrices and enMATypes.
Before:

After:

That worked for me in the end as fxdreema appears to import those sections into the EA and for the 2 indicators they are imported twice. Hence the compiler will throw an error. I don't know if that is a fxdreema bug or one would call it "works as designed".
Let me know if that helped you.
-
WOW. That's what I call a real helpful hint.

-
@l-andorrà Well, if you for some reason kick out the one inidcator with the enum declaration, you will run in the issue that the datatype is not defined. So you must use this with care!
-
@trader-philipps Thanks for your time!!! I look into it!