Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Quick Market Watch Launcher v1.1 - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

author blogger | 467 reads | 0 comments |

This is an updated and improved version that contains updates to the license terms.

Spread parameters have been encoded as a partial list of variables and there is an option to open all symbols on Market Watch.

The method of use is still very simple.

 //--- these are user input variables accessible from the terminal when launching the script
Input ENUM_TIMEFRAMES Time Range = Invalid ; Input Spread Max_spread = all_values; //--- This is the SymbolInfo object (provided with the standard package) to facilitate the use of symbol properties. CSymbolInfo m_symbol;

We loop through the market watch and check the symbol properties (spread and availability on the market watch) while checking the applicability of the spread through a function of type int maxSpread() that handles user input.

 for ( integer i = 0 ; i < total number of symbols ( true ); i++) {
          pair = symbol_name (i, true );
if (pair == symbol_name (i, true )) {
if (m_symbol.Name(pair)) { //--- check spread attribute integer spread_limit = maxSpread(Max_spread);
//--- if (propagation limit == - 1 )
chartOpen (pair, timeframe);
Else if (m_symbol.Spread() < spread_limit)
chartOpen (pair, timeframe);
              }
          } //--- Close the attached chart because another instance is open. if (i== 0 )
ChartClose ( 0 );
    }

Compile the file and launch it on any chart and select your preferred settings.

Your continued use of this product will be deemed confirmation of your agreement to the terms of the GNU License.

Enjoy your ideas!


Attachment download

📎 watch_launcher.mq5 (3.96 KB)

Source: MQL5 #29460

Refresh