@GLAB You can set the frequencies using the settings in MyConfig.h, which is in the MySensors folder. If you put any of the defines from MyConfig.h into your sketch, they will override the MyConfig.h setting for that sketch only.
If you are using the RF24 radio, there are different channels which correspond to a given frequency. The default is channel 76. There is a list of typical channels in MyConfig.h. If you want to change the channel for all the sketches, change it in MyConfig.h. If you want to change it just for the sketch, add a define to the sketch. For example:
#define MY_RF24_CHANNEL (84)
The problem with changing the channel in a sketch is that the gateway has to be on the same channel to receive from the node. So, normally it makes sense to change in MyConfig.h because you usually want the gateway and all the nodes on the same channel.
Other radio's like the RFM69 list the frequency instead of using a channel. They can be overridden in the sketch as well. You can find the defines that are needed in MyConfig.h