Remembering Your Trade Plan

 

Hello, dear MQL Forum

I am trying to remember my trading plans in the following way: hotkey <ctrl+1> a script that save a template...

This is what it does

#property show_inputs

enum TemplateName{
plan_USDCHF=1,  //USDCHF
plan_USDJPY=2,  //USDJPY
plan_AUDCHF=3,  //AUDCHF
...
plan_SOMEOTHER=26, //SOMEOTHER
};
input TemplateName a=1; //Template Name
...
...
...
void OnStart()
  { 
string tplName;
if(a==1){tplName = "#001#plan_USDCHF";}
else if(a==2){tplName = "#002#plan_USDJPY";}
else if(a==3){tplName = "#003#plan_AUDCHF";}
...
else if(a==26){tplName = "#026#plan_SOMEOTHER";}
ChartSaveTemplate(0,tplName);
}
and when I edit my chart and am done with a plan, I hit ctrl+1 and 

ScriptSaveTemplate

QUESTION

How to make the input TemplateName default to the appropriate enum value ( 1-26) depending on the current ChartSymbol()?

 
the way I solved this was to declare
int a=0;
instead, and then just
string currentchart,tplName;
currentchart=ChartSymbol(NULL);

if (currentchart=="USDCHFi"){a=1;}
else if (currentchart=="USDJPYi"){a=2;}
else if (currentchart=="AUDCHFi"){a=3;}

...
if(a==1){tplName = "#001#plan_USDCHF";}
else if(a==2){tplName = "#002#plan_USDJPY";}
else if(a==3){tplName = "#003#plan_AUDCHF";}
else if(a==4){tplName = "#004#plan_NZDCHF";}

works fine, except I get no opportunity to make any selections, it's like, script will save the current chart only if a template for its name already exists...

any opinions, recommendations, observations that you'd like to express are certainly welcome

and thank you, this Forum is a great resource for learning, indeed

Reason: