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
Alain;
This is really very strange. Now, when running in Strategy Tester, the EA opens a new Indicator sub-window, on every tick...........
I have created an empty window indicator to avoid any calculation issues. Here it is attached.
The revised iCustom call is as follows:
The iCustom call is after the OnTick() call.Place your iCustom() in OnInit() and declare you handle as a global variable.
Sorry - Now that you've explained it is pretty obvious. It was a silly question!!!
cheers
Try to rename it "CustomCurrencyMeter" without a dot in the name.
Since I updated to latest version (build 1643, not sure what I was on before) I can no longer reference custom indicators from a subfolder in my Experts directory for organizational reasons. That is my indicators live under `...\MQL5\Experts\DS_1MilNetWorthBy40\Indicators`. This worked before the update but now I get:
2017.09.08 23:31:46.418 DS_1MilNetWorthBy40-v52 (EURUSD,MN1) cannot load custom indicator '..\Experts\DS_1MilNetWorthBy40\Indicators\DS_EntryPatternA' [4802]
The interesting thing it is still working in Strategy Tester no problem, I only discovered this issue when I created a new verion of the expert and re-added it to the chart window (I think). How can I use iCustom to load up indicator from within the Expert directory, I'd hate to have to re-structure my folder layout. The below is the relevant code:
```
ArrayResize(aEntrySignalHandles,SymbolsTotal(false));
for (int i=0; i < SymbolsTotal(false); i++) {
if (StringFind(sTRADE_ENTERES_ALLOWED_SYMBOLS, SymbolName(i,false), 0) > -1) {
aEntrySignalHandles[i] = iCustom(
SymbolName(i,false)
,_Period // irrelevant for our trend detector that is always on M1
,"..\\Experts\\DS_1MilNetWorthBy40\\Indicators\\" + EnumToString(iTRADE_ENTERES_SIGNAL)
);
// FIXME: if iCustom ever fails return and abort
if (INVALID_HANDLE == aEntrySignalHandles[i]) {
//Alert("`SymbolName(i,false)=" + SymbolName(i,false) + "`, `EnumToString(iTRADE_ENTERES_SIGNAL)=" + EnumToString(iTRADE_ENTERES_SIGNAL) + "`, `INVALID_HANDLE == aEntrySignalHandles[i]`");
Alert("=== OnInit(): error getting signal handle, `GetLastError()=" + GetLastError() + "`" + "`, `ErrorDescription(_LastError)=" + ErrorDescription(_LastError) + "`");
return INVALID_HANDLE;
}
}
}
```
Attaching a screenshot of the EA working in Strategy Tester mode.
Hello Alain,
It works in custom indicator strategy test, but it doesn't work in my real account. So the indicator does not open fully. Therefore, EA does not open an order. What is the solution to this.