Unisciti alla nostra fan page
TickValue_Compare — diagnose differences between TICK_VALUE, LOSS and PROFIT - script per MetaTrader 5
- Visualizzazioni:
- 168
- Valutazioni:
- Pubblicato:
-
Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance
PURPOSE
Compares the three tick-value properties exposed by MetaTrader 5 for every symbol in Market Watch:
- SYMBOL_TRADE_TICK_VALUE (generic).
- SYMBOL_TRADE_TICK_VALUE_LOSS (used for loss calculations).
- SYMBOL_TRADE_TICK_VALUE_PROFIT (used for profit calculations).
WHY THIS MATTERS
Many EAs use one of the tick-value properties for risk-based lot sizing. When LOSS and PROFIT differ (as they do for cross-currency pairs on many brokers), choosing the wrong property leads to incorrectly sized positions:
- Using LOSS: pessimistic loss estimate - smaller lots (safer, conservative for risk management).
- Using TV: usually equals PROFIT (optimistic) - slightly larger lots than intended.
This script provides empirical per-symbol data so you can make an informed decision based on your specific broker.
USAGE
- Add to Market Watch the symbols you want to analyze.
- Drop the script on any chart.
- Enter the input parameters and click the OK button.
- Check the Experts tab for the summary.
- If "Save CSV" is enabled, full per-symbol data is exported to a CSV file in MQL5/Files/ (useful for large brokers, since the Experts tab is limited to ~2000 lines).

OUTPUT
Each symbol is classified into one of these categories:
ALL_EQUAL: the three properties match within tol.
TV_MATCHES_PROFIT: TV == PROFIT, LOSS slightly different.
TV_MATCHES_LOSS: TV == LOSS, PROFIT slightly different.
ALL_DIFFER: all three properties are distinct.
A summary at the end aggregates counts per category.
INTERPRETATION
- If most/all symbols are ALL_EQUAL, your broker treats LOSS and PROFIT as identical - any of the three properties is safe.
- If TV_MATCHES_PROFIT is common (typical pattern), then:
- For risk-based sizing, use TICK_VALUE_LOSS (most conservative).
- TV (generic) effectively equals PROFIT, the optimistic value.
Heiken ashi as series
Heiken ashi with all buffers set as series
TransactionCostCollector — Broker Cost Profiling Script
Triple-barrier labeling pipelines frequently use an arbitrary constant (0.5–1.0%) or a legacy spread assumption as the min_ret threshold. A threshold set below the actual round-trip transaction cost causes the pipeline to label cost-driven noise as tradeable signal. The labeled dataset then systematically overstates edge, and any model trained on those labels overfits to an artifact of the labeling scheme rather than to genuine market structure. TransactionCostCollector.mq5 is a standalone script that resolves the data-collection step of this problem.
SetSLByLoss — set Stop Loss on all open positions by target loss amount
Script to set Stop Loss on every open position based on a target loss in the account's currency (e.g. $50 per position). Works on any deposit currency and any forex symbol. Validates broker stops/freeze levels. Currency conversion handled automatically.
MACD Signals
Indicator edition for new platform.
