당사 팬 페이지에 가입하십시오
- 조회수:
- 6
- 평가:
- 게시됨:
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
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을 켜고 끄는 상태로 실행하여 "하락폭" 열을 비교해 보십시오.
제한 사항: 포지션 사이즈 조정은 우위를 창출하지 않으며, 기존에 존재하는 우위를 증폭시킬 뿐입니다. 실제 거래는 이루어지지 않습니다.
MetaQuotes Ltd에서 영어로 번역함.
원본 코드: https://www.mql5.com/en/code/77079
Position sizing from risk, using the broker's own tick value and volume step
위험 금액을 기준으로 한 포지션 규모는, 가정된 핍(pip) 값이 아닌 해당 종목의 실제 틱 값, 틱 크기 및 거래량 단위를 바탕으로 계산됩니다. 거래량은 항상 아래로 반올림되며, 위험 금액이 최소 랏보다 작을 경우 이를 알리고 해당 랏의 실제 비용을 보고합니다. 터미널 상태가 아니므로 포지션 크기 산정 로직을 오프라인에서 테스트할 수 있으며, 41개의 어설션으로 구성된 테스트 스크립트가 포함되어 있습니다.
Session Range Breakout: Asia, London and New York high/low levels
Session Range Breakout draws the high and low of up to three intraday sessions (Asia, London and New York by default) and extends each level to the right with optional H/L labels and a range rectangle. Session hours, names and colours are configurable in server time. Optional popup, sound and push alerts fire when a bar closes outside a session range. The levels are fixed once the session closes, so the drawing does not repaint. The indicator draws chart objects only and never opens trades.
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
Read-only panel showing per-magic net P/L, account drawdown, daily-loss breaker progress and freeze/liquidate thresholds. Does NOT trade.