Can't seem to be able to fetch indicator data from external chart running the same indicator (Using iCustom)
note that there's a different section of the forum for MT4 related questions
will MT4 iCustom ever be equal to EMPTY_VALUE?
double value = iCustom(liveSymbols[shift],livePeriods[shift],indicatorName, comm,TimeFrame,MaType,PriceH,PriceL,FMaLength,cm,FVidyaSmoothPeriod,FPct,FHLPeriod,FBandUpClr,FBandDnClr, co,MMaLength,MVidyaSmoothPeriod,MPct,MHLPeriod,MBandUpClr,MBandDnClr, cx,SMaLength,SVidyaSmoothPeriod,SPct,SHLPeriod,SBandUpClr,SBandDnClr, UnmetCon,c,ShowState,fontSz,bufferIndex,/*shift*/1);
-
On MT5, iCustom retuns a handle, not a double. Moved to MT4 forum. Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
-
if(FetchIndicatorBufferValue(liveIDs[i],"HTLT Alerts V5",0,i,true) == 1) res = "Long"; else if(FetchIndicatorBufferValue(liveIDs[i],"HTLT Alerts V5",0,i,true) == -1) res = "Short"; else if(FetchIndicatorBufferValue(liveIDs[i],"HTLT Alerts V5",0,i,true) == 0) res = "No Signal";
Don't use strings when you mean an enumeration
-
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - MQL4 programming forum - Page 3 #26.4 (2019)
-
On MT5, iCustom retuns a handle, not a double. Moved to MT4 forum. Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
-
Don't use strings when you mean an enumeration
-
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - MQL4 programming forum - Page 3 #26.4 (2019)
Seems there is quite a lot wrong with these particular functions. Will rewrite and ask for help on mt4 forum if problem persists. Thank you

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Been trying multiple solutions, my current one seems like the one that was going to work but no.
The idea is that the indicator will be running on multiple charts (in the same mt4 terminal), the solution I am trying to work should fetch the indicator value
[in this case I attempted to use iCustom to fetch the value then will check that value against an array to use later in order to display a signal the indicator found in another chart]
I am certain the code to select the chart is not the issue and the arrays I am passing have values assigned so I have no idea where the issue is.
Note: when I run the LoadStates() function, MT4 crashes.