Nice. Can you convert this EA to Script? Thank you.
Here you go:
//+------------------------------------------------------------------+ //| Script to Change Chart Symbol on all charts | //+------------------------------------------------------------------+ #property script_show_inputs input string input_symbol = "EURUSD"; // Default symbol const int chartlimit = 10; // Function to change chart symbol void ChangeChartSymbol(long chartID, string symbol) { ENUM_TIMEFRAMES chartTF = ChartPeriod(chartID); if(ChartSymbol(chartID) != symbol) { ChartSetSymbolPeriod(chartID, symbol, chartTF); PrintFormat("Change symbol of the chart %s. New symbol %s", symbol, chartID); } } void OnStart() { // Get the first chart ID long chartID = ChartFirst(); int count = 0; // Loop through charts while(chartID >= 0 && count < chartlimit) { ChangeChartSymbol(chartID, input_symbol); // Get the next chart ID chartID = ChartNext(chartID); count++; } }
It work well. Thank you.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
SymbolSyncEA:
Syncs all chart symbols to symbol of the chart the EA is attached to
Author: Max B