Read the documentation.
You must use CopyBuffer to get the values.
Get the handle in OnInit().
Documentation on MQL5: Technical Indicators / iCustom
- www.mql5.com
iCustom - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
The indicator does not load despite the modifications. I've moved the indicator to a new folder "Indicators\Custom\tmp.ex5"
#property copyright "Copyright 2022, CoachX Fomo" #property link "" #property version "1.00" input bool zone_show_weak=true; // Show Weak Zones input bool zone_show_untested = true; // Show Untested Zones input bool zone_show_turncoat = true; // Show Broken Zones int OnInit() { double zoneData = iCustom(_Symbol, PERIOD_CURRENT, "Custom\\tmp",zone_show_weak, zone_show_untested,zone_show_turncoat); Comment("custom indicator handle: ", zoneData); Print("Zones = ", zoneData, " error = ", GetLastError()); return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { //--- Print("Expert Removed"); } void OnTick() { } //+------------------------------------------------------------------+
Files:
error_message_2.JPG
40 kb
Indicator | iCustom |
---|---|
⋮ input int BackLimit=1000; // Back Limit input bool HistoryMode=false; // History Mode (with double click) input string pus1="/////////////////////////////////////////////////"; input bool zone_show_weak=true; // Show Weak Zones ⋮ | double zoneData = iCustom(_Symbol, PERIOD_CURRENT, "Custom\\tmp", bool zone_show_weak, bool zone_show_untested, bool zone_show_turncoat ); ⋮ |
Parameters in iCustom do not match indicator.
Thank you very much it worked
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm trying to get values from a custom indicator into my Ea but i'm getting errors. I've compiled the indicator with name "tmp" saved in the path MQL5\indicators.
Here is the Ea source.
Here is the indicator and error message