거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
지표

ATR Trailing Stop (Pine Script Port) - MetaTrader 5용 지표

Usama Bin Islam
Usama Bin Islam
MQL5 developer: Expert Advisors from written rules, indicator development, Pine Script to MQL5 conversions, and cost-aware backtesting.
How I work:
- I turn your rules into a short written spec (entries, exits, stops, sizing, filters) before writing any code, so we agree on the logic first.
| Korean English Русский 中文 Español Deutsch 日本語 Português Français Italiano Türkçe
조회수:
15
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

ATR 트레일링 스톱 (Pine Script 포팅)


TradingView Pine Script 지표를 MQL5로 변환한 실제 예시이며, Python 참조 구현과 호환성을 유지합니다.


규칙 (세 버전 모두 동일):

- nLoss = ATR 배수 × InpATRLength 바 동안의 실제 변동폭(true range)의 SMA

- 가격이 스탑 수준보다 높을 때는 스탑이 가격 아래로 점차 상승하고, 가격이 스탑 수준보다 낮을 때는 스탑이 가격 위로 점차 하강합니다

- 가격이 스탑을 관통하여 마감하면 스탑이 반대쪽으로 전환되고 화살표가 그려집니다


Pine에서 MQL5/Python으로의 변환 참고 사항 (실제 이식 작업):

- ta.tr(true): 첫 번째 봉에는 이전 종가가 없으므로, 해당 봉의 실제 변동폭은 고가에서 저가를 뺀 값입니다

- ta.sma(x, n): n개의 바가 존재할 때까지 na로 유지됨 (첫 번째 유효 값은 n-1번째 바에서 발생)

- nz(stop[1], src): 이전 스톱 값이거나, 이전 스톱 값이 여전히 na인 경우 현재 가격

- var float stop = na: 바에서 바로 전달되는 상태로, MQL5에서는 지속적 버퍼로, Python에서는 실행 중인 배열로 변환됨

- ta.crossover / ta.crossunder: 양쪽 중 어느 한쪽이라도 na인 동안은 엄격히 false이며, 이는 첫 번째 유효 바에서 중요합니다


저장소 (Pine 소스, 교차 검증을 위한 바별 리터럴 참조 구현이 포함된 Python 포트, 그리고 두 구현을 MQL5 출력과 비교하는 패리티 테스트): github.com/RAo797bit/pine-python-mql5-conversion


MetaEditor에서 오류 0개, 경고 0개로 문제없이 컴파일됨 합성 가격 시계열에 대한 ATR 추적 손절매.

MetaQuotes Ltd에서 영어로 번역함.
원본 코드: https://www.mql5.com/en/code/77655

Trade Reporter Lite - Telegram trade notifications Trade Reporter Lite - Telegram trade notifications

MT5에서 체결 및 청산된 포지션을 텔레그램 채팅방에 게시합니다: 포지션 방향, 종목, 진입 가격, 스탑 및 목표 가격(핍 단위), 랏 수, 그리고 청산 시 결과, 핍, R-배수 및 보유 시간. 재시도 대기열, 재시작 시 데이터 보존, 실제 거래는 수행하지 않습니다. MT5용 무료 텔레그램 및 디스코드 거래 알림 도구

Session Time Highlighter Session Time Highlighter

Highlights the Asia, London and New York sessions and the London/New York overlap using real local time and daylight saving rules, so the session boxes are correct on any broker.

Garch: GARCH, GJR-GARCH and EGARCH volatility models with forecasts Garch: GARCH, GJR-GARCH and EGARCH volatility models with forecasts

Fits GARCH(1,1), GJR-GARCH and EGARCH with normal, Student t or GED shocks by maximum likelihood, with robust standard errors and variance forecasts.

VpsToolkit - safe order send and restart-safe state for VPS EAs VpsToolkit - safe order send and restart-safe state for VPS EAs

Include for EAs running 24/7 on an MQL5 VPS or PC: run-where switch, order send with OK/FAIL/UNKNOWN result (no duplicate orders after a timeout), restart-safe counters, positions closed while the EA was off, append-only log and optional Telegram. No trading logic inside.