Free MT4/MT5 Source: Custom Indicator Buffer to Trade Framework

5 September 2026, 07:05
Jetaroon Sriboonruang
0
22
I have released the source code of Custom Logic For Trading Mini for both MetaTrader 4 and MetaTrader 5.

WHY THIS FRAMEWORK EXISTS

A custom indicator can leave an old non-empty value in its buffer for several ticks or for the rest of a bar. If an EA treats every non-empty read as a new signal, the same old value may repeatedly trigger entries.

This framework preserves separate rolling long and short signal histories. The first observed state is ignored, and a trade is accepted only after a later valid transition from false to true. An unavailable buffer read is skipped rather than inserted as false, so a temporary read failure cannot re-arm a stale signal.

WHAT IS INCLUDED

- MT4 and MT5 source files
- Price-cross, level-cross, and symbol/arrow buffer modes
- Direct or reversed interpretation
- Long only, short only, or both directions
- Fixed lot size, optional stop loss and take profit
- Optional position limit, opposite-signal closing, and break-even
- Configurable indicator shift
- README, changelog, flow image, and MIT license

IMPORTANT

This is an execution framework, not a complete trading strategy. It requires a compatible custom indicator and uses that indicator default inputs unless you extend the iCustom call. Check the correct buffer indexes and signal meaning in Strategy Tester and on a demo account before live use. No profitability or win-rate claim is made.

SOURCE CODE


The project is free to inspect, modify, and reuse under the MIT License.


Custom Logic Trading Mini signal-history flow