Fan sayfamıza katılın
SetSLByLoss — set Stop Loss on all open positions by target loss amount - MetaTrader 5 için komut dosyası
- Görüntülemeler:
- 225
- Derecelendirme:
- Yayınlandı:
-
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git
Script that sets a Stop Loss on every open position based on a target loss amount expressed in the account's currency (e.g. $50 per position). Works for any deposit currency (USD, AUD, EUR, NZD, etc.) and any forex symbol - currency conversion is handled automatically via SYMBOL_TRADE_TICK_VALUE_LOSS. Validates broker stops/freeze levels before submitting changes, skips positions whose SL is already correct, and reports clear reasons for any positions that cannot be modified. The target loss is set in an input parameter: Maximum loss (amount in account currency) for each position.
LOGIC
- For each open position, calculates the SL price such that if hit, the loss equals approximately InpTargetLossAmount (in the account's currency).
- Validates against stops level and freeze level before submitting modifications.
- Skips positions that already have a correct SL (within 1 tick of the target).
- Skips positions whose price has moved so far that placing the SL would violate broker constraints, logging the reason.
TickValue_Compare — diagnose differences between TICK_VALUE, LOSS and PROFIT
Diagnostic script that compares SYMBOL_TRADE_TICK_VALUE, SYMBOL_TRADE_TICK_VALUE_LOSS and SYMBOL_TRADE_TICK_VALUE_PROFIT for every symbol in Market Watch. Classifies each symbol into one of four categories (ALL_EQUAL, TV_MATCHES_PROFIT, TV_MATCHES_LOSS, ALL_DIFFER) and provides an aggregated summary plus interpretation tip. Useful for verifying which tick-value property to rely on when implementing risk-based lot sizing in EAs. Exports full per-symbol report to CSV in MQL5/Files.
Heiken ashi as series
Heiken ashi with all buffers set as series
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.
