Can a Shared Project contain both an EA and indicators in MQL5? I have compile issues with duplicated OnInit functions

 

Can a Shared Project contain both an EA and indicators in MQL5? I have compile issues with duplicated OnInit functions.

There must be something wrong in my thinking as both the EA mq5 file as the indicator mq5 file have a OnInit function. 

What is the recommended code style to solve this? 


 
Sander Bruyneel:

Can a Shared Project contain both an EA and indicators in MQL5? I have compile issues with duplicated OnInit functions.

There must be something wrong in my thinking as both the EA mq5 file as the indicator mq5 file have a OnInit function. 

What is the recommended code style to solve this? 


Using a project file (mqproj) you can only have one "main" mq5, an EA or an indicator or...

However you can use the Shared Projects folder with as much mq5 (EAs, Indicators...), but then you can't use a mqproj.