Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Function for checking whether the market is open for trading at the moment by the current symbol - script for MetaTrader 5

Views:
631
Rating:
(4)
Published:
2025.05.22 11:39
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
bool CheckTradeAllowed()
  {
   MqlDateTime date_cur;
   TimeTradeServer(date_cur);
   datetime seconds_cur = date_cur.hour * 3600 + date_cur.min * 60 + date_cur.sec;
   int i = 0;
   while(true)
     {
      datetime seconds_from = {}, seconds_to = {};
      if(!SymbolInfoSessionTrade(Symbol(), (ENUM_DAY_OF_WEEK)date_cur.day_of_week, i, seconds_from, seconds_to))
         break;
      if(seconds_cur > seconds_from && seconds_cur < seconds_to)
         return true;
      ++i;
     }
   return false;
  }

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/57948

Candle Filter Candle Filter

The Candle Filter indicator is a customisable tool designed to filter and highlight candles on the chart based on specific criteria. It allows the trader to visualise only the candles of interest, such as bullish candles, bearish candles, Doji candles or all candles simultaneously. In addition, the indicator offers full control over the colours of the candles and the chart background, providing a clear and adaptable visual experience.

Basket Manager EA Basket Manager EA

This EA is meant to impose a few rules to manage baskets.

Equity and Balance Indicator - History based Equity and Balance Indicator - History based

This indicator reads the trade history and plots the Cumulative P & L over time, helping visual traders to see how much money they are making or losing over time. This current version has a difference of 0.02% marginal error, due to rounding floats, and calculation methods. It can be considered extremely precise with this marginal error.

Trendline zigzag in qualitative channel Trendline zigzag in qualitative channel

A dynamic trendline-based evolution of the Donchian Channel

This website uses cookies. Learn more about our Cookies Policy.