Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Scripts

Quick Market-watch Launcher - script for MetaTrader 5

Nelson Wanyama

Views:
1570
Rating:
votes: 9
Published:
2020.05.30 10:31
//+------------------------------------------------------------------+
//|                                        Market_Watch_Launcher.mq5 |
//|                                 Copyright 2020, Sir. Dev_spartah |
//|                                                254loop@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, Sir. Dev_spartah"
#property link      "254loop@gmail.com"
#property script_show_inputs
#property version   "1.00"
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
#property description " This script opens all market watch symbols with the default template"
#property  description "using the selected period. Save prefferred template as default.tpl to have all"
#property description " charts open with same template of your choice. Happy Trading."
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
#include <Trade\SymbolInfo.mqh>
//---
input ENUM_TIMEFRAMES Time_frame = PERIOD_H1;
input double Max_spread         = 20;
CSymbolInfo    m_symbol;
string Pair;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
    {
//    loop through market watch and open symbols fitting specifications
     for(int i = SymbolsTotal(true) - 1; i >= 0; --i)
         {
          Pair = SymbolName(i, true);
          if(Pair == SymbolName(i, true))
              {
               if(m_symbol.Name(Pair))
                   {
                    if(m_symbol.Spread() < Max_spread)
                         ChartOpen(Pair, Time_frame);
                   }
              }
          if(i == 0)
              {
               ChartClose(0);
              }
         }
//---     The task was completed successfully.
//---     Close the script and print some info for the user
     Print("Task Complete. Closing.");
     return;
    }

//+------------------------------------------------------------------+
    Base64Encrypt Class Base64Encrypt Class

    This a library for a quick and easy encryption and decryption using base64. The usage is very simple and can be done in a few lines of code. <<< The return value of a method is the required output. <<< Feel free to use this library at your convenience.If it is helpful, please reward me by rating this item on mql5 site. >>From a developer, for developers.<<

    Alphabet structure Alphabet structure

    Sets of latin, russian characters, digits, punctuation, etc.

    Binary Flags Binary Flags

    How to minimize bool parameters in a function signature?

    EMA on RSI EMA on RSI

    Calculates a Exponential Moving Average based on RSI Data, instead of the regular Pricing data. Simple and and to the point.