Why empty value shows for indicator in mt4

 
0

I have an indicator named "Star-Profit-Channel.ex4", It has 7 values my code is :

void OnTick(){

   double starProfitChannel1 = iCustom(NULL, 0, "Star-Profit-Channel", 0, 1);
   double starProfitChannel2 = iCustom(NULL, 0, "Star-Profit-Channel", 1, 1);
   double starProfitChannel3 = iCustom(NULL, 0, "Star-Profit-Channel", 2, 1);
   double starProfitChannel4 = iCustom(NULL, 0, "Star-Profit-Channel", 3, 1);
   double starProfitChannel5 = iCustom(NULL, 0, "Star-Profit-Channel", 4, 1);
   double starProfitChannel6 = iCustom(NULL, 0, "Star-Profit-Channel", 5, 1);
   double starProfitChannel7 = iCustom(NULL, 0, "Star-Profit-Channel", 6, 1);

   Print("starProfitChannel1 = ", starProfitChannel1);
   Print("starProfitChannel2 = ", starProfitChannel2);
   Print("starProfitChannel3 = ", starProfitChannel3);
   Print("starProfitChannel4 = ", starProfitChannel4);
   Print("starProfitChannel5 = ", starProfitChannel5);
   Print("starProfitChannel6 = ", starProfitChannel6);
   Print("starProfitChannel7 = ", starProfitChannel7);

}

when I run this code the result is in picture on attached file

but it shows empty values, Why?, How can I solve it?
Timeline for Why empty value shows for indicator in mt4
Timeline for Why empty value shows for indicator in mt4
  • stackoverflow.com
Stack Overflow | The World’s Largest Online Community for Developers
 
sulaiman4j:
0

I have an indicator named "Star-Profit-Channel.ex4", It has 7 values my code is :


when I run this code the result is in picture on attached file

but it shows empty values, Why?, How can I solve it?



https://www.mql5.com/en/charts/11516639/eurusd-h1-qnb-finans-yatirim

 double starProfitChannel1 = iCustom(NULL, 0, "Star-Profit-Channel", 0, 1);
   double starProfitChannel2 = iCustom(NULL, 0, "Star-Profit-Channel", 1, 1);
   double starProfitChannel3 = iCustom(NULL, 0, "Star-Profit-Channel", 2, 1);
   double starProfitChannel4 = iCustom(NULL, 0, "Star-Profit-Channel", 3, 1);
   double starProfitChannel5 = iCustom(NULL, 0, "Star-Profit-Channel", 4, 1);
   double starProfitChannel6 = iCustom(NULL, 0, "Star-Profit-Channel", 5, 1);
   double starProfitChannel7 = iCustom(NULL, 0, "Star-Profit-Channel", 6, 1);
   
  if(starProfitChannel1!=2147483647) Print("starProfitChannel1 = ", starProfitChannel1);
  if(starProfitChannel2!=2147483647) Print ("starProfitChannel2 = ", starProfitChannel2);
  if(starProfitChannel3!=2147483647) Print ("starProfitChannel3 = ", starProfitChannel3);
  if(starProfitChannel4!=2147483647) Print ("starProfitChannel4 = ", starProfitChannel4);
  if(starProfitChannel5!=2147483647) Print ("starProfitChannel5 = ", starProfitChannel5);
  if(starProfitChannel6!=2147483647) Print ("starProfitChannel6 = ", starProfitChannel6);
  if(starProfitChannel7!=2147483647) Print ("starProfitChannel7 = ", starProfitChannel7);
Chart EURUSD, H1, 2020.03.21 09:30 UTC, QNB Finans Yatirim Menkul Degerler A.S., MetaTrader 4, Demo
Chart EURUSD, H1, 2020.03.21 09:30 UTC, QNB Finans Yatirim Menkul Degerler A.S., MetaTrader 4, Demo
  • www.mql5.com
Symbol: EURUSD. Periodicity: H1. Broker: QNB Finans Yatirim Menkul Degerler A.S.. Trading Platform: MetaTrader 4. Trading Mode: Demo. Date: 2020.03.21 09:30 UTC.