Join our fan page
- Published by:
- Conor Mcnamara
- Views:
- 439
- Rating:
- Published:
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This is just a rewrite of metaquotes heiken ashi indicator with all buffers set as series. It is not to be anything other than educational.
When I first started studying this framework, I was very confused about how to change buffer indices and loop indices. For example, I had one one indicator that was designed with buffers in series, I wanted to add the heiken ashi, and I didn't know how to add the heiken ashi correctly (when the heiken ashi buffers were not originally designed to run in series mode).
Now with this code, it might be more easier for learners to digest how everything should be changed when you take a non-series indicator construction, and convert it so that everything runs in series. This might also provide clarity to those who are familiar with mql4, but yet to work with mql5.
Some indicators constructed in series can use a start index of "rates_total - prev_calculated" securely, but you need one extra bar to safely calculate the heiken ashi when it uses a historical [i+1] index in the calculation.
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.
Spread Monitor
Allows to monitor spread and swaps!
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.
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.
