43 Zeilen
2,4 KiB
Markdown
43 Zeilen
2,4 KiB
Markdown
# Custom Logic For Trading Mini
|
|
|
|
Source-first execution framework for MetaTrader 4 and MetaTrader 5.
|
|
|
|
This package connects a custom indicator buffer to a small, readable order-execution layer. It is intentionally a framework, not a trading strategy and not a profitability claim.
|
|
|
|
## Included
|
|
|
|
- `Custom Logic For Trading Mini.mq4` — MT4 Expert Advisor source
|
|
- `Custom Logic For Trading MT5 Mini.mq5` — MT5 Expert Advisor source
|
|
|
|
## What it does
|
|
|
|
1. Reads a selected buffer from a custom indicator.
|
|
2. Interprets that value as a price cross, level cross, or non-empty symbol signal.
|
|
3. Enters on a false-to-true signal transition.
|
|
4. Supports long-only, short-only, or both sides.
|
|
5. Applies fixed lot size, optional stop loss/take profit, an order cap, opposite-signal closing, and optional break-even.
|
|
|
|
## Quick start
|
|
|
|
1. Copy the matching `.mq4` or `.mq5` file to the terminal's `MQL4/Experts` or `MQL5/Experts` directory.
|
|
2. Compile it in MetaEditor.
|
|
3. Set `indicator_name` to the indicator path relative to the matching `Indicators` folder. Include a subfolder when needed, for example `MyFolder\\MyIndicator`.
|
|
4. Choose the correct buffer index and signal type.
|
|
5. Start with a demo account and verify the indicator's buffer meaning before enabling live execution.
|
|
|
|
## Important behavior
|
|
|
|
- The original rolling-array signal flow is preserved: the first observed state after attachment is ignored, and a trade requires a later false-to-true transition.
|
|
- A persistent old buffer value remains true-to-true and cannot repeatedly re-arm an entry.
|
|
- An unavailable indicator value is not appended to signal history and never becomes a signal, including when `ReversalLogic` is selected.
|
|
- `maximum_order = 0` means no framework-level cap. Positions are counted only when symbol and magic number match.
|
|
- `take_profit`, `stop_loss`, `break_even_trigger`, and `break_even_target` are distances in points, not pips.
|
|
- Indicator input parameters are not guessed or hard-coded. If the indicator requires non-default inputs, expose them in the EA and pass them to `iCustom` as part of your own integration.
|
|
|
|
## Scope and safety
|
|
|
|
This source is supplied for learning and customization. It does not promise a win rate, return, or suitability for any account. Test the indicator integration and broker constraints on a demo account before live use. The author is not responsible for trading losses.
|
|
|
|
## License
|
|
|
|
Released under the MIT License. See `LICENSE.txt`.
|