Hi coders, kindly advise me with your codes. I plan to basket close all open trades if a condition is met, my EA will capture the basket time (BskTm) automatically (I know to code this step). Based on the BskTm, I would like to get the next new H1 bar's time to allow the EA start next new trading session (NewHrTm).
Below are 2 scenarios (BskTm1 and BskTm2) :-
How to get NewHrTm1 automatically as below ??
2nd scenario :-
How to get NewHrTm2 automatically as below ??
Kindly advise with your codes, thanks
Below are 2 scenarios (BskTm1 and BskTm2) :-
Inserted Code
datetime BskTm1=D'2024.12.09 08:36'; // 1st Basket Close Captured Time
How to get NewHrTm1 automatically as below ??
Inserted Code
datetime NewHrTm1=D'2024.12.09 09:00';
2nd scenario :-
Inserted Code
datetime BskTm2=D'2024.12.09 23:12'; // 2nd Basket Close Captured Time
How to get NewHrTm2 automatically as below ??
Inserted Code
datetime NewHrTm2=D'2024.12.10 00:00';
Kindly advise with your codes, thanks