거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
귀하의 MetaTrader 5 터미널에서 CodeBase에 액세스 해보세요
올바른 코드를 찾을 수 없습니까? 프리랜싱 섹션에서 주문하십시오
Expert Advisor 또는 지표 작성 방법

MQL5 MetaTrader 5용 소스 코드 스크립트

icon

스크립트는 MQL5 프로그램을 사용하여 MetaTrader 5에서 일회성 동작을 수행하고 그 직후 차트에서 삭제됩니다. 샘플 기능으로는 거래 내역 업로드, 보고서 생성, 이메일 발송, 파일에서 데이터 다운로드 및 처리 등이 있습니다. 또한 스크립트를 사용하여 그래픽 인터페이스를 만들거나 단일 유형의 거래 작업을 신속하게 실행할 수 있습니다. 예를 들어, 모든 포지션을 즉시 닫을 수 있습니다.

MetaTrader 5에서 제공되는 스크립트를 다운로드하여 시작할 수 있습니다. 스크립트 라이브러리는 MQL5 프로그래밍을 학습할 수 있는 MetaEditor 개발 환경에서 직접 사용할 수도 있습니다.

코드를 제출하세요
최근 | 최고

Partially close active sell orders

Script for partially close active buy orders

XAUUSD (금) 거래는 종종 USD, GBP 또는 EUR 발표와 같은 주요 경제 뉴스 이벤트의 영향을 받습니다. 이러한 변동성이 큰 기간 동안 위험을 줄이려면 EA(Expert Advisor)에서 뉴스 필터를 사용하는 것이 필수적입니다. 이 글에서는 MT5에서 간단한 뉴스 필터를 만들어 XAUUSD 거래에 적용하는 방법을 알려드리겠습니다.

이 스크립트의 목적은 전문 기술 분석 프로그램에서 분석하기 편리한 형식으로 시세 내역을 내보내는 것입니다.

H1 주기의 스토캐스틱 오실레이터 반전 신호를 기반으로 하는 간단하고 효과적인 전문가용 어드바이저입니다. 매수 신호는 %K가 20 레벨 아래 %D를 초과하면 발동되고, 매도 신호는 %K가 80 레벨 위 %D를 하회하면 발동됩니다. 위험은 계좌 잔고에 따라 계산되며 로트 크기는 0.1로 설정됩니다(필요에 따라 조정 가능). 테이크프로핏(TP)은 모든 포지션에 300포인트로 설정되며 스톱로스(SL)는 반대 크로스 오버 신호에 따라 동적으로 계산합니다. 포지션은 반대 방향의 크로스오버가 발생하거나 TP 또는 SL에 도달하면 청산됩니다.

클립보드 콘텐츠 검색(클립보드)

인구 기반 최적화 알고리즘이 여기에 수집되어 있습니다. 이 아카이브에는 테스트 함수에서 알고리즘을 실행하는 데 필요한 모든 파일이 포함되어 있습니다.

이 스크립트는 터미널에서 열려 있는 모든 차트의 동기 스크롤을 제공합니다.

이 기능은 거래가 마감된 시간에 거래 요청으로 서버에 과부하가 걸리지 않도록 하는 데 유용합니다.

스크립트는 루돌프 악셀 레벨을 그립니다.

The Auto SL TP by Risk Reward Ratio script is a simple yet powerful tool designed for MetaTrader 5 traders who want to streamline their risk management process. This script automates the process of setting Stop Loss (SL) and Take Profit (TP) levels for open positions based on a user-defined Risk:Reward ratio and Stop Loss in pips. Whether you're a beginner or an experienced trader, this script saves time and ensures consistent risk management.

캔들 서명 예시 | 연구 및 개발용

한 달에는 30 일, 1 년에는 365 일이 있다는 점을 고려합니다. 스크립트는 새해가 시작될 때까지의 시간 카운터를 보여줍니다.

이 CalculateHistoryProfit 스크립트 버전 1.0은 차트 패널을 사용하여 지정된 기간 동안의 수익을 계산하도록 설계되었습니다.

These are some #define statements that are useful to perform operations in your EA. You only need to assign the name of your variables at the beginning of the file, and then let the other #define statements do the work. In order to use this file, add #include <DEFINE_statements.mqh> to the first line in your EA file.

A simple starting-point script to collect data and send to a CSV in oldest-newest ordering. In this example only the close price data is collected.

A script which when dragged onto the chart will print out in the experts window the number of bars that are on that chart - like magic.

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.

This script was developed for displaying saved Strategy report from the Strategy Tester into a chart.

This script is a reference solution for mapping symbol names configured by users in MetaTrader 5 EAs or scripts to the actual names provided by the broker. It uses the Levenshtein distance algorithm to automatically identify the most similar symbol in Market Watch. It is ideal for developers facing compatibility issues with prefixes or suffixes in symbol names. This is a customizable starting point to adapt to any specific needs.

The script MinMargins.mq5 is designed to help traders quickly calculate and document the minimum amount of money required to open a position with the smallest lot size for all symbols available in the Market Watch. This data is saved to a CSV file for easy review and analysis.

This service periodically checks swaps for predefined symbols and saves detected changes into CSV-files for further analysis and potential replay (not implemented here). Also it monitors and alerts swap changes of existing positions.

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

This MQL5 script exports candlestick data for various timeframes into a CSV file, capturing essential market information like open, high, low, and close prices. It analyzes each candlestick's characteristics, including body and wick sizes, while calculating additional metrics such as candle gaps. After processing the latest 21 bars, it notifies the user upon successful data export.

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

- The script scans through the current chart for any available chart objects, - Counts and delete them accordingly - And log the the names of the objects on the chart respectively.

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

A script which when run displays the maximum lot size permitted on the asset.

script to open a buy position at the current price in the MT5 window with a specified stop loss (in pips) and take profit (in pips)

This script saves all the OHLCV data available on the chart to a CSV file.

It will delete all objects on the chart when the compiled executable is dragged onto the chart

Script For Trap News High Impact

Sample code to count consecutive no. of bull or bear bars.

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.

Script to determine whether your Broker follows the US, UK or AU daylight (DST) schedule.

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

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.

Sec-WebSocket-Key Generator

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.

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

12345678
OSZAR »