- You don't force iCustom to use anything. iCustom ONLY reads what is in the indicator's buffers. Period. If the indicator doesn't provide a parameter to control something is can't be done. Detailed explanation of iCustom - MQL4 forum
EMA_0 = iCustom(NULL,TimePeriodDay,"EMA",5,3,1,0,0);
Do you really have a CUSTOM indicator called EMA? I doubt it. Perhaps you should RTFM: iMA - MQL4 Documentation
Hi WHRoeder
tried modiffied iCustom, you have right, TDI have this option to use "RSI Price settings".
Unfortunatelly the output is not the same as output of iRSI.
Is it possible that my setup of TDI is wrong, or have downloaded not working version?
double RSI_Green_00 = iRSI(NULL,0,13,PRICE_OPEN,0); // the RSI at the current time frame double RSI_Green_11 = iRSI(NULL,0,13,PRICE_CLOSE,1); // the RSI at the current time frame double RSI_Green_22 = iRSI(NULL,0,13,PRICE_CLOSE,2); // the RSI at the current time frame RSI_Green_0 = iCustom(NULL,0,"TDI_Red_Green",13,PRICE_OPEN,34,2,0,7,0,4,0); RSI_Green_1 = iCustom(NULL,0,"TDI_Red_Green",13,PRICE_CLOSE,34,2,0,7,0,4,1); RSI_Green_2 = iCustom(NULL,0,"TDI_Red_Green",13,PRICE_CLOSE,34,2,0,7,0,4,2);
Files:
tdi_red_green.mq4
9 kb
Found what was necessary.
Thanks for opening my eyes..
I'm also having this issue, works for Market Base Line but not for the RSI green line:
double TDI_RSI_Green_1, TDI_RSI_Green_2, TDI_MarketBase_Yellow_1, TDI_MarketBase_Yellow_2; // https://www.mql5.com/en/forum/144862 //WORKS (corresponds to values on indicator in MT4) TDI_MarketBase_Yellow_1 = iCustom(NULL, 0, "TDI_Red_Green", 13, PRICE_CLOSE, 34, 2, 0, 7, 0, 2, //2=Market Base 1 ); Print("TDI_MarketBase_Yellow_1=", TDI_MarketBase_Yellow_1); //WORKS TDI_MarketBase_Yellow_2 = iCustom(NULL, 0, "TDI_Red_Green", 13, PRICE_CLOSE, 34, 2, 0, 7, 0, 2, //2=Market Base 2 ); Print("TDI_MarketBase_Yellow_2=", TDI_MarketBase_Yellow_2); // DOES NOT WORK (different values shown than last 2 bars in MT4 indicator chart) TDI_RSI_Green_1 = iCustom(NULL, 0, "TDI_Red_Green", 13, PRICE_CLOSE, 34, 2, 0, 7, 0, 4, //4=RSI Price line 1 ); Print("TDI_RSI_Green_1=", TDI_RSI_Green_1); // DOES NOT WORK TDI_RSI_Green_2 = iCustom(NULL, 0, "TDI_Red_Green", 13, PRICE_CLOSE, 34, 2, 0, 7, 0, 4, //4=RSI Price line 2 ); Print("TDI_RSI_Green_2=", TDI_RSI_Green_2);

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
Hello All,
I have trouble with using of iCustom & RSI signal in TDI indicator.
I'm using iCustoms like this
Yes I can use iRSI
But what about EMA, TSL & MBL? They are always recalculate with every new tick, so their 1tick values are differ than output of tester run.
With iCustom for RSI - I got always another value, for following lines in tester and reality. I have another output in the morning, another at afternon and another in the evening, always taking 1st tick.
Of course EA tester is not usable for this, I think it took last value of the day, but my EA is operating with 1st tick of new bar.
In correct situation Shift0 of today shall be the same number as Shift1 in next day, if I can set "PRICE_OPEN" for Shift0 and "PRICE_CLOSE" for Shift1
Is here some clever easy solution for this situation?
How can I force iCustom to use "PRICE_OPEN" or "PRICE_CLOSE" ??
Many Thanks for any advice
Yuri