https://docs.mql4.com/marketinformation/symbolselect - this is the function you need.
Here is example of how your init function could look to make the strategy work:
int init(){
lots=initiallots;
dg=Digits;
SymbolSelect(symbol1, true);
SymbolSelect(symbol2, true);
return(0);
}
But, unfortunately, there is some limitations of SymbolSelect usage in JForex:
1) you can't subscribe to instruments from indicators
2) you can't unsubscribe from instruments (for both strategies and indicators)