I take it you have downloaded the InstallMacOSX.dmg from the
How to upgrade to OS X El Capitan – Apple Support
When you open the InstallMacOSX.dmg you will see InstallMacOSX.pkg.
Double-clicking on the InstallMacOSX.pkg will open an installation window.
This does not install El Capitan, after all it says it will take 7Mbs of disk space.
That is your first clue, an operating system does not take up only 7Mbs disk space.
What is happening is the installation window is going to create the
Install OS X El Capitan.app in your Applications folder.
So when it asks you what disk you want to install on you must select the driver you are
actually booted up to, not any other internal or external drives you want to eventually install
El Capitan on. Once you have done that look in your Applications folder for Install OS X El Capitan.app.
You can then simply double-click on that to start the installation of El Capitan, at one point you
will be asked to select the disk you want to install El Capitan to, that is when you select your
external drive.
When the install has completed the Install OS X El Capitan.app will self delete, so for safe keeping
if you ever need it again make a copy fit before going ahead with the install.
Or you can create a bootable USB installer using the createinstallmedia command in Terminal,
How to create a bootable installer for macOS – Apple Support