Guarda come scaricare robot di trading gratuitamente
Ci trovi su Facebook!
Unisciti alla nostra fan page
Accedi al CodeBase dal tuo terminale MetaTrader 5
Non hai trovato il codice che fa per te? Ordinane uno dalla sezione Freelance
Come scrivere un Expert Advisor o un indicatore

I migliori codici sorgente MQL4 e MQL5 in base ai giudizi degli utenti

Invia il tuo codice

Lo script calcola il numero di candele rialziste e di quelle ribassiste nel timeframe considerato. Con una semplice modifica, cambiando due valori indicati all'interno del codice sorgente, è possibile scegliere quante candele/barre controllare. Default il programma valuta le ultime 40 candele aggiornandosi ogni 30 secondi. Il risultato viene visualizzato su grafico e su registro expert. Lo script aggiunge inoltre una media dei prezzi di chiusura e può essere allegato a più coppie di valuta cripto/fiat simultaneamente.

PNG

Forget about BMP files like a bad dream. Thanks to this library, you can now use the PNG format, which has a number of advantages, such as being more compact without losing image quality and maintaining transparency.

Nella quarta parte del libro, ci concentreremo sulla padronanza delle funzioni integrate (API MQL5) e ci addentreremo gradualmente nei sottosistemi specializzati. Qualsiasi programma MQL5 può utilizzare una pletora di tecnologie e funzionalità. Pertanto, ha senso iniziare con le funzioni più semplici e utili che possono essere utilizzate nella maggior parte dei programmi.

The Heiken Ashi indicator with no repaint or repaint mode input option.

This indicator is designed to draw a Fibonacci retracement, using as a basis the ZigZag indicator.

Translate risk percentages to the monetary figure based on the account balance

PTB

Indicator Description: PTB.mq5 Overview: The PTB.mq5 indicator for MetaTrader 5 calculates short-term and long-term high and low prices, along with Fibonacci retracement levels based on these extremes. Features: Short-Term High and Low: Identifies immediate support and resistance over a user-defined short length. Long-Term High and Low: Analyzes broader market trends over a longer period. Fibonacci Levels: Plots key retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) for potential reversal points. Input Parameters: shortLength: Number of candles for short-term calculation. longLength: Number of candles for long-term calculation. Visual Representation: Distinct colors and widths for each line to differentiate between high/low and Fibonacci levels. Usage: Helps traders identify entry/exit points and monitor market trends based on historical price levels.

Time-related functions for empirical detection of server time zone and daylight savings mode (DST) from history of quotes

This script saves a predefined set of economic events from the MetaTrader's built-in economic calendar into CSV file.

Marking the extreme highs and lows (OHLC) together with the extreme bid and ask prices

This indicator displays current events on the chart and allows you to export the calendar to archives for backtesting, automatically fixing time discrepancies between the history of bars and the history of events. This is an improved version of CalendarMonitorCached indicator from the algotrading book.

BollingerBandsEA trades according to Bollinger Bands.

Unfortunately, I discovered that some brokers are a bit sloppy with the server time change due to the daylight saving time (DST), which I did not expect and which surprised me a lot. Here is a script with which anyone can check their broker.

Purtroppo ho dovuto constatare che alcuni broker sono un po' negligenti con il cambio dell'ora del server, cosa che non mi aspettavo e che mi ha molto sorpreso. Ecco uno script con cui tutti possono controllare il proprio broker.

Name of expert is 'MultiStrategyEA'

Calculate DST for USA, EUR, AUD and RUB and the offset time of the broker automatically from the 70's until 2030 - even in the Strategy Tester of MQ.

La settima parte finale del libro discute le funzionalità avanzate dell'API MQL5, che saranno utili durante lo sviluppo di programmi per MetaTrader 5. Questi includono simboli finanziari personalizzati, eventi del calendario economico integrato e tecnologie generiche come reti, database e crittografia.

Nella quinta parte del libro, approfondiremo le API associate al trading algoritmico, tra cui l'analisi e l'elaborazione dei dati finanziari, la visualizzazione dei grafici, l'automazione e le interazioni con gli utenti.

The source codes written during the development of the library for creating multi-currency Expert Advisors that combine many instances of various trading strategies.

This EA help you for Auto set the TP & SL by default parameter, Auto trailing stop & step for any order that you place from any device, Easy way to close all orders with 3 Button "Close All" "Close Profit" "Close Lose", Auto close all orders by profit or lose treshold value

Linear Regression Value indicator with an option that allows it to be applied to another indicator

WeekDays indicator displays Day Of Week, Week Of Year, Day Of Year or Bar Index in the Data Window, and optionally in labels on the chart.

La seconda parte "Fondamenti di programmazione MQL5" è un'introduzione ai concetti chiave di questo linguaggio di programmazione. Questa parte del libro è dedicata ai tipi di dati, agli identificatori, alle variabili, alle espressioni e agli operatori. Imparerete come combinare diverse istruzioni per formare la logica del programma.

AO - Awesome Oscillator - without iAO() beginner tutorial to learn how to code in MQL5

Copy and paste selected graphical objects between charts via Windows clipboard as text. Use Ctrl+Q on a source chart, then Ctrl+J on a target chart.

A new interface library has been developed to simplify the process of converting MT4 indicators and Expert Advisors (EAs) to MT5. This library supports most of the MetaTrader 4 functions, offering developers a unified solution for cross-platform compatibility.

The Pending_tread EA is a versatile and easy-to-use trading robot designed to automate the placement and management of multiple pending orders arranged in a grid pattern above and below the current market price. This EA is well-suited for scalping strategies and can operate on any timeframe or currency pair, making it highly flexible for various trading styles.

Rsi without Irsi() beginner tutorial to learn how to code in MQL5

Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York).

Indicatore "Coefficiente di correlazione

Linear Regression Slope

Rsi Indicator

An advancement of the MetaQuotes zigzag with an oscillator mode, current bar leg tracking, fib levels, and dynamic scaling

The SuperTrend Indicator is a dynamic trend-following tool based on ATR. It plots a colored line above or below price to indicate bullish or bearish conditions. When the price crosses the line, a signal arrow appears. Fully customizable with ATR period, multiplier, arrows, labels, and colors. Suitable for all instruments and timeframes. Ideal for scalping, swing, and intraday trading. Combine it with other indicators for stronger setups.

A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

This indicator helps user estimate the potential price movement for the current day, based on 20 days historical data and market trends.

Class to access to the local time for the specified location, as well as time zone information and the local trading session hours.

iRSI Very Simple A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190