No, you can't trade Pokémon from "Pokémon Diamond" to say "Pokémon Emerald" however you can migrate Pokémon from "Pokémon Emerald" into "Pokémon Diamond" however this is a 1-way transfer, there's no way for it to go back into say "Pokémon Emerald" for example.
Pokémon Diamond, Pearl, Platinum, HeartGold and SoulSilver can trade between 1 another only.
Pokémon Ruby, Sapphire, FireRed, LeafGreen and Emerald can trade between 1 another only however you can migrate your Pokémon from Ruby/Sapphire/FireRed/LeafGreen/Emerald into any of the 5 DS games I stated above but as I said previously it's a 1-way transfer. Once you migrate them into the DS game, there is absolutely no way for you to get it back into those Gameboy Advanced games.
All you have to do is get access to Pal Park in the game. In Diamond/Pearl/Platinum Pal Park is southeast of Sandgem Town whefreas in HeartGold/SoulSilver it's in Fuchsia City. In Diamond/Pearl/Platinum you have to complete the Sinnoh Dex by seeing all of the Pokémon that are in the Sinnoh Dex then you go see Professor Rowan in his lab in Sandgem Town and he'll give you the National Dex which will give you access to the Pal Park.
Basically here are the main steps you need to take.
1. In the GBA (Gameboy Advanced) games, make sure the Pokémon you want to migrate are in the PC. You cannot migrate Pokémon that are in the game's party.
2. Make sure the Pokémon you're migrating aren't holding mail and don't know any HM moves like Cut, Surf, etc.
3. Put the DS game and the GBA game into the proper slots of the DS or DS Lite. This will not work for the DSi due to it only having a slot for DS games.
4. Start the DS game and when it gets to the start menu where it says "Continue," "New Game," "Mystery Gift," there will be an option that says "Migrate from" so select that and press it. It'll take you into the GBA game's PC.
5. Next select the 6 Pokémon you want to migrate. It has to be exactly 6, it can't be lower or higher than that. After confirming your intentions they'll be sent into the DS game's Pal Park.
6. Now go into your DS game and go into Pal Park. You'll have to find the 6 you migrated and re-catch them with a Park Ball however Park Balls are automatic catches however if you migrated something that might live or reside in the water then you'll need to a bring a Pokémon that knows Surf with you as well.
7. Once you've caught all 6 Pokémon in the Pal Park, you're done with migrating. The Pokémon will be exactly the same as they were in the GBA games. Also once you've caught all of your 6 migrated Pokémon in Pal Park you'll be able to migrate again however in Diamond/Pearl/Platinum you'll have to wait 24 hours before you can migrate again however in HeartGold/SoulSilver there is no waiting involved.
Yes you can trade Pokémon from Pokémon Diamond to Pokémon HeartGold or Pokémon SoulSilver.