Compile Not affect extern section??

 

I note that when I do any change in the extern and compile the file it is not affect anything in the extern section.

I have to go to every charts  that i attached the file to it and reset the extern. OR attache the indicator again to the chart


My Question:
Is there any way that can reset the external setting automatically when i change any things in the file and compile it?
 

add an additional extern such as

 extern int temporary=0;

 then next time comment it out

 //extern int temporary=0;

 and so on

 
thank you GumRai appreciate your help
Reason: