Failed to create EMA handle for 0
I have created a Ea with EMA and ADX. However while adding EA to the Forex pair chart, it was showing up the below error. Could you help me in resolving this issue.
While compiling the EA, it showed 0 errors
Create the handle after initialization
String Replace returns how many characters it replaced not the new string
the string is still in pairs[i]
string tempSymbol = StringReplace(pairs[i], " ", ""); // ✅ Fix StringTrim issue
Those all are available in the account, but all the pairs are not present in marketwatch
try this
string tempSymbol = StringReplace(pairs[i], " ", ""); // ✅ Fix StringTrim issue if(SymbolSelect(pairs[i],true)){ CheckRetracement(pairs[i], PERIOD_M5, "M5"); // 5 Min Timeframe CheckRetracement(pairs[i], PERIOD_M1, "M1"); // 1 Min Timeframe }
although its not the optimal way to approach this
string tempSymbol = StringReplace(pairs[i], " ", ""); // ✅ Fix StringTrim issue if(SymbolSelect(pairs[i],true)){ CheckRetracement(pairs[i], PERIOD_M5, "M5"); // 5 Min Timeframe CheckRetracement(pairs[i], PERIOD_M1, "M1"); // 1 Min Timeframe }
I have created a Ea with EMA and ADX. However while adding EA to the Forex pair chart, it was showing up the below error. Could you help me in resolving this issue.
While compiling the EA, it showed 0 errors
Attached the file for reference.