Good afternoon, all. Please help me rewrite the script code. Now the script translates all open charts to period n1. How can I rewrite the code so that the script applies a template with the specified name to all open charts?
//| Script program start function |//+------------------------------------------------------------------+/********************Script program start function*******************/voidOnStart()
{
long prevChart = ChartFirst();
while(prevChart >= 0)
{
if(ChartPeriod(prevChart) != PERIOD_H1)
ChartSetSymbolPeriod(prevChart, ChartSymbol(prevChart), PERIOD_H1);
prevChart = ChartNext(prevChart);
}
}/******************************************************************//*****************************End program****************************///+------------------------------------------------------------------+
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The continuestatement transfers control to the beginning of the nearest external while, do-while or for statement.
In my example, the operator return. I was asking for it.
Exits the OnTick function
How will it exit from OnTick if this subroutine is constantly circulating in the EA?
That's what will come out of the current run (as if it had reached the end). On the next tick, there will be a new call.
That's what will come out of the current run (as if it had reached the end). On the next tick there will be a new call
I.e. it will return to the beginning of OnTick. thanks, got it.
I.e. will return to the beginning of the OnTick. Thanks, got it.
It will come back with the arrival of the new tick. You can wait a long time for it in the non-liquids.
OnTick is not a forever-type loop, but rather an interrupt operation.Good afternoon, all. Please help me rewrite the script code. Now the script translates all open charts to period n1. How can I rewrite the code so that the script applies a template with the specified name to all open charts?
Here, this will help you.
Here, this will help you.
ChartApplyTemplate()where in the script should be substituted?And for a particularly "gifted" person, can you please explain the function in which place of the script should be substituted?
here's the script
here's the script
Thanks so much for the code - I'll be adding it to the meta editor tomorrow, it's getting late today.