DislikedGumrai, do you perhaps know how can I set external parameter for timeframes to use? That is, when I run the script, I want to be able to select timeframes that I want those vertical lines to be plotted on. I.e. - I want vertical lines to be plot on 1h, 4h, and daily. Thank you for your cooperation, Best regards, SimonIgnored
Before start
insert
#property script_show_inputs
//--- input parameters
input bool Show_On_H1=true;
input bool Show_On_H4=true;
input bool Show_On_D1=true;
int TF=0;
Just after start()
insert
if(Show_On_H1) TF+= OBJ_PERIOD_H1;
if(Show_On_H4) TF+= OBJ_PERIOD_H4;
if(Show_On_D1) TF+= OBJ_PERIOD_D1;
Wherever you have
ObjectSet (Name, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H4 | OBJ_PERIOD_D1 | OBJ_PERIOD_H1);
Replace with
ObjectSet (Name, OBJPROP_TIMEFRAMES, TF);
If you want to use additional TF, then just add them in
Please Do Not PM Me With Coding Enquiries