Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Access the CodeBase from your MetaTrader 5 terminal
Couldn't find the right code? Order it in the Freelance section
How to Write an Expert Advisor or an Indicator

Top scripts for MetaTrader 5 based on user ratings

Submit your code

Easy to use.

This is a script to export rates and ticks of current chart's symbol into CSV-files compatible with MT5's export/import format.

Multi_BreakEven is a script file that enables setting multiple entry positions to breakeven, either through pips or a target price, once the trade becomes favorable.

This is a simple program to compare asynchronous and synchronous all close. It is a sample program, so feel free to modify it for your own testing purposes, such as adding conditions.

This Script collects all MQL5 built-in indicators buffers and stores them in a CSV file for analysis purposes

Set TakeProfit by just dragging and dropping script on the desired price level.

While manually adjusting the stop-loss of a single trade to match its open price is a relatively simple task, managing numerous positions individually can be cumbersome and time-intensive. The Titik Impas Breakeven script for MT4/MT5 streamlines this process, providing efficiency and convenience for traders dealing with multiple positions.

The script is useful for inspecting the structure of ONNX models, providing insights into the input and output, their names, and their properties. It is particularly helpful for debugging and understanding the characteristics of ONNX models used in machine learning applications.

This is a script to print all open trades and their PnLs at a specific time in history.

Export history of closed positions from MT5 retail hedging account selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software.

This script finds DeMark pivot points, displays them on the chart and indicates their dimensions.

This function performs the main logic of opening a trade. Calculates the opening price, take profit levels and stop loss based on symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information, such as symbol, volume, order type, deviation, comment, magic number, etc. Call the OrderSend function to send the operation request and get the result. SetTypeFillingBySymbol function: Determines the order fill type (Fill or Kill, Immediate or Cancel, or Return) based on the symbol's filling policy. GetMinTradeLevel function: Calculates the minimum operating level based on the freeze level and the symbol stops level. Adjusts the minimum level to make sure it is within certain limits and returns the result.

Sec-WebSocket-Key Generator

The script obtains information about the number, types and sizes of input and output tensors in an ONNX model

Provide simplest class to read and parse CSV file

A small example of the Mandelbrot fractal calculation in OpenCL. The OpenCL accelerates calculations of fractal approximately up to 100 times in comparison with the CPU calculations.

A simple script that allows you to open a Short position using the current price location with a specified Risk Percentage and Reward Ratio.

Simple script for apply template and/or timeframe to all charts opened.

The script controls the display of time and price scales for all open charts or only for one chart.

Display interactive HTML graph of the account balance inside the web browser.

Encapsulating a family of interchangeable algorythms which can be modified independently from the client.

This script helps traders understand the distribution and range of candles in a specific period, which can be useful for making trading decisions such as determining which historical values to use for Take Profit or Stop Loss.

A script for placing a BuyStop order

The script deletes all pending orders on all symbols at a time.

Get commission of an active position in mt5 , its easy to use function.

To assist traders who wish to open multiple buy orders quickly, a script file has been developed that allows them to execute a large number of trades with just one command. The default take profit and stop loss values are set in 5-digit broker format, but for traders using a 4-digit broker, the default must be TP=40 and SL=20. Num_of_Buy is the number trades the trader wish to open instantly. This script file can be extremely useful for traders who want to take advantage of market conditions quickly and efficiently. By simplifying the process of opening multiple buy orders, it can save traders valuable time and allow them to focus on other aspects of their trading strategy.

Here is a simple example that shows how to download page(file) from Internet using the library wininet.dll.

The script shows the trade volume in lots required to move the position to a desired level.

The script draws horizontal lines representing BUY (blue) and SELL (red) orders.

This is the version 2 of my script to export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. More columns were added and fixed minor errors. The code for processing and exporting data was rewritten.

The script downloads historical data (for the current symbol), available at trade server.

The script tests the computer in 45 performance tests. It is possible to compare the performance of VPS/VDS servers.

Learn how to split the volume data into different groups so that you can compare them and create a strategy based on volume average.

Set StopLoss by just dragging and dropping script on the desired price level.

The script exports historical quotes data from MetaTrader 5 for the import to MetaTrader 4. This solution will allow you to get the full history for MetaTrader 4.

A script for placing a SellLimit order

Export tool for OHLC prices, calculated prices & indicator buffers

Script gets information about input and output tensors of onnx-model, their types and shapes

Calculates the risk in the account currency for a given trading volume of the selected symbol at different time periods.

Export of all necessary instruments and time frames in one click with load and checking history

1234567