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

Contract Sizer: ladder, floor and a breaker that survives a deposit - MetaTrader 5용 라이브러리

Joao Prata Silva Yglesias
Joao Prata Silva Yglesias
Trader and algorithmic developer focused on risk-managed automation for the Forex market. I build Expert Advisors that prioritize capital protection and survivability over hype — real strategies, transparent results, and live monitoring.
| Korean English Русский 中文 Español Deutsch 日本語 Português Français Italiano Türkçe
조회수:
23
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

ContractSizer.mqh는 계좌 잔고를 기반으로 계약 규모를 결정하며, 세 가지 별도의 보호 기능을 제공합니다: 래더 ( 잔고 단위당 1계약, 항상 상한선 적용), 플로어 (최소 자본금 미만의 거래 금지), 브레이커 (잔고 최고치의 일정 비율에 도달 시 거래 중단되며, 자동으로 재설정되지 않음).

입금 및 출금 내역은 거래 내역(DEAL_TYPE_BALANCE)에서 읽어오며, 잔고 최고치를 동일한 금액만큼 조정하므로, 손실 기간 중에 이루어진 입금으로도 손실 추이가 가려지지 않습니다. 잔고 최고치는 MQL5\Files에 저장되어 터미널 재시작 후에도 유지됩니다.

생성자: CContractSizer(factor = 3000.0, maxContracts = 500, minContracts = 1, minCapital = 1500.0, maxDD = 0.0, peakFile = "contract_sizer_peak.txt") . 사용법: 매 틱마다 ContractsToday(TimeLocal())를 호출하십시오. 이 함수는 하루가 바뀔 때만 재계산됩니다. CapByBalance()는 수동 랏 설정 시에도 유지됩니다. Rearm()은 수동으로 결정해야 합니다.

데모 입력값: InpBalancePerContract = 3000, InpMinCapital = 1500, InpMaxDrawdown = 0.20, InpDemoDeposit = true.

이 데모는 드로다운 최저점에서 자금을 추가한 후 12일간의 시뮬레이션 경로(잔고 / 최고치 / 하락폭 / 계약 수 / 이벤트)를출력한 다음, 실제 계좌에서 실제 클래스를 실행합니다. InpDemoDeposit을 켜고 끄는 상태로 실행하여 "하락폭" 열을 비교해 보십시오.

제한 사항: 포지션 사이즈 조정은 우위를 창출하지 않으며, 기존에 존재하는 우위를 증폭시킬 뿐입니다. 실제 거래는 이루어지지 않습니다.

Contract Sizer 데모: 드로다운 최저점에서 입금하기

MetaQuotes Ltd에서 영어로 번역함.
원본 코드: /en/code/77079

Position sizing from risk, using the broker's own tick value and volume step Position sizing from risk, using the broker's own tick value and volume step

위험 금액을 기준으로 한 포지션 규모는, 가정된 핍(pip) 값이 아닌 해당 종목의 실제 틱 값, 틱 크기 및 거래량 단위를 바탕으로 계산됩니다. 거래량은 항상 아래로 반올림되며, 위험 금액이 최소 랏보다 작을 경우 이를 알리고 해당 랏의 실제 비용을 보고합니다. 터미널 상태가 아니므로 포지션 크기 산정 로직을 오프라인에서 테스트할 수 있으며, 41개의 어설션으로 구성된 테스트 스크립트가 포함되어 있습니다.

TesterStats: Strategy Tester report statistics in MQL5 code TesterStats: Strategy Tester report statistics in MQL5 code

Calculates the Strategy Tester report statistics from the deal history, including Z-Score, AHPR, GHPR, LR Correlation and LR Standard Error, which TesterStatistics() does not return. Checked value by value against the tester.

Non-Repainting Fair Value Gap Detector Non-Repainting Fair Value Gap Detector

Non-repainting three-bar Fair Value Gap detector for MetaTrader 5. Closed-bar detection, the 50% Consequent Encroachment level, mitigation as an explicit state machine, incremental scanning, and a built-in self-audit that re-checks the stored gap levels against the closed-bar series on attach. Pure native MQL5, no DLLs, no external dependencies.

GM Matrix Monitor — read-only risk dashboard for your EA matrix GM Matrix Monitor — read-only risk dashboard for your EA matrix

Read-only panel showing per-magic net P/L, account drawdown, daily-loss breaker progress and freeze/liquidate thresholds. Does NOT trade.