• Sign up >>

ICustom not loading - MQL5 - page 2

To add comments, please log in or register
Alain Verleyen
39007
Alain Verleyen  
Torinex:

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.
Torinex
101
Torinex  
Alain Verleyen:
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

Mladen Rakic
162719
Mladen Rakic  
Alain Verleyen:
Try to rename it "CustomCurrencyMeter" without a dot in the name.
That happens whenever there is a dot in the name other than the one before the extension - it has been reported to service desk long time ago ;(
danielsokolowsk
70
danielsokolowsk  

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;

      }  

}

   }

```


danielsokolowsk
70
danielsokolowsk  

Attaching a screenshot of the EA working in Strategy Tester mode. 

Files:
ersan yurdakul
104
ersan yurdakul  

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.

12
To add comments, please log in or register