Unexpected values from iCustom with REX oscillator

 

Hi All,

I'm going to go at this question from a simple and basic approach before posting too much code, etc... 

I have a version of the REX oscillator indicator that I use in a manual algo (as an exit indicator) and recently I decided to try and create a EA, I found the iCustom command and have used it for some of the other indicators in my system - now the actual question - I'm now trying to use REX in the iCustom however am not getting expected outputs.

When I add the default parameters and use the final 2 iCustom fields; the last field points to the candle as expected but the other field is where I get unexpected results - if I use the number 2, I get the TvB (True value of bar) value however using 0 & would have given me the Rex and Signal values .. or so I thought!!

Unfortunately the use of either 0 or 1 just results in zero/0 .. can anyone advise what value I should use or where I'm going wrong? REX attached now.

   string REX = "Rex"; //Exit indi
   double REXTvB =iCustom(NULL,0,REX,14,9,14,9,2,0) gives a value
   double REX_0 =iCustom(NULL,0,REX,14,9,14,9,0,0) always results in 0
   double REX_1 =iCustom(NULL,0,REX,14,9,14,9,1,0) always results in 0
Files:
Rex.mq4  2 kb
 
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.


  2. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    Do you expect us to know what indicator and what version you are trying to use? Where is the indicator or a link to it.

 

Remember to use the CODE button (Alt-S) when inserting code.

Code button in editor