• Forum
  • Market
  • Signals
  • Freelance
  • VPS
  • Quotes
  • Articles
  • CodeBase
  • Algo Forge
  • Documentation
  • AlgoBook
  • NeuroBook
  • Calendar
  • WebTerminal
  • About
  • Download MetaTrader 5
Home
  • Log in
  • Create an account
  • English
  • Русский
  • 中文
  • Español
  • Português
  • 日本語
  • Deutsch
  • 한국어
  • Français
  • Italiano
  • Türkçe

Tony A Antony / Publications

  • Profile
  • Achievements
  • Seller
  • Algo Forge Repository
  • Publications
  • All messages
  • Main

Forum

3

How to generate truly random numbers across multiple charts in the same terminal?

I have 4 charts setup with my EA on an MT4 terminal. A portion of the code needs to generate a random number, which will then be used as the interval for a timer. This is done to prevent the 4 charts from writing to a particular terminal global variable at the same time. This is my code to

  • MQL5.community
    • Online trading / WebTerminal
    • Free technical indicators and robots
    • Articles about programming and trading
    • Order trading robots on the Freelance
    • Market of Expert Advisors and applications
    • Follow forex signals
    • Low latency forex VPS
    • Traders forum
    • Trading blogs
    • Charts
  • MetaTrader 5
    • MetaTrader 5 Trading Platform
    • MetaTrader 5 latest updates
    • News, implementations and technology
    • MetaTrader 5 User Manual
    • MQL5 language of trading strategies
    • MQL5 Cloud Network
    • MQL5 Algo Forge
    • Download MetaTrader 5
    • Install Platform
    • Uninstall Platform
  • Website
    • About
    • Timeline
    • Terms and Conditions
    • Recurring Payment Agreement
    • Agency Agreement – Offer
    • Privacy and Data Protection Policy
    • Cookies Policy
    • Contacts and requests
  • MetaTrader 5
    Download MetaTrader 5 for Windows
    Download MetaTrader 5 for MacOS
    Download MetaTrader 5 for Linux
    Open MetaTrader 5 WebTerminal
    Scan to install from App Store
    Scan to install from Google Play
    Scan to install from Huawei AppGallery
    Scan to get Android APK file
    MQL5 Channels
    Scan to install from App Store
    Scan to install from Google Play
    Scan to install from Huawei AppGallery
    Scan to get Android APK file
    Economic Calendar
    Scan to install from App Store
    Scan to install from Google Play
    Scan to install from Huawei AppGallery
    Scan to get Android APK file
    Follow us on socials for top articles and CodeBase updates
    Not a broker, no real trading accounts
    35 Dodekanisou str, Germasogeia, 4043, Limassol, Cyprus
    Copyright 2000-2025, MetaQuotes Ltd