Warrior_EA/Variables/IndicatorResources.mqh
AnimateDread aee542bc2f refactor(indicator-resources): centralize indicator embedding in main EA file
Moved #resource directives for all custom indicators from IndicatorResources.mqh to Warrior_EA.mq5 to keep embedding logic in a single location and simplify build configuration. Updated comments to clarify MARKET vs. private build behaviour and path resolution.
2026-07-23 15:28:04 -04:00

32 lines
1.8 KiB
MQL5

//+------------------------------------------------------------------+
//| IndicatorResources.mqh |
//| AnimateDread |
//+------------------------------------------------------------------+
//| Custom-indicator NAME RESOLUTION for every CiCustom/iCustom load |
//| in this EA (the 5 AD price-action indicators + ADZigZag + the |
//| unified ADMovingAverage). Toggled by WARRIOR_MARKET_BUILD. |
//| |
//| MARKET build: each indicator is EMBEDDED as a #resource (declared |
//| in Warrior_EA.mq5) from the standard MQL5\Indicators\ folder and |
//| called DIRECTLY via its "::" resource path. Nothing is written to |
//| disk, so a single self-contained .ex5 ships to the Market with no |
//| external files. The "::" path here MUST match the #resource paths |
//| in Warrior_EA.mq5 (same path, minus the leading backslash). |
//| |
//| Private build: referenced by bare name so iCustom loads the |
//| external <MQL5>\Indicators\<name>.ex5 at runtime - faster than |
//| unpacking a resource, and dev terminals already have them. |
//+------------------------------------------------------------------+
#ifndef WARRIOR_INDICATOR_RESOURCES_MQH
#define WARRIOR_INDICATOR_RESOURCES_MQH
#ifdef WARRIOR_MARKET_BUILD
//--- resolves to the resource embedded from MQL5\Indicators\ (see the #resource block in Warrior_EA.mq5);
//--- the "::" path mirrors the #resource path minus its leading backslash
#define WARRIOR_CI(name) ("::Indicators\\" + (name) + ".ex5")
#else
//--- external, loaded by bare name from <MQL5>\Indicators\ at call time
#define WARRIOR_CI(name) (name)
#endif
#endif // WARRIOR_INDICATOR_RESOURCES_MQH