Automatically save template
-
Hi all,
I would like my EA to automatically save template every 1 minute. Is there a way to do that?
-
Problem solved: I asked Deepseek to write the custom MQL code for me and it works great!
https://fxdreema.com/shared/3m3re13B
The code is as follows:
MqlDateTime dt;
TimeToStruct(TimeCurrent(), dt); // Get the current time as a structure// Create template name "TEMPLATE-YY-MM-DD hh-mm-ss"
string templateName = StringFormat("TEMPLATE-%02d-%02d-%02d %02d-%02d-%02d",
dt.year % 100, // Get last two digits of the year
dt.mon, // Month
dt.day, // Day
dt.hour, // Hour
dt.min, // Minute
dt.sec); // Second// Save the template
if (ChartSaveTemplate(0, templateName))
{
Print("Template saved successfully: ", templateName);
}
else
{
Print("Failed to save template.");
} -
PS: Deepseek knows how fxdreema works. When asking Deepseek to write some code, it's important to specify in the prompt that it will be used in fxdreema.
-
Interesting. Thank you for sharing.
-
@l-andorrà My pleasure