Problem with iCustom called "FXA0 - RSI Crossing 50 plus ATR ver1[1].2" indicator.

 

Hi!!

Any one please help me to find this problem; when i use iCustom to call "FXA0 - RSI Crossing 50 plus ATR ver1[1].2" indicator only 0 value return to me at all time.

double RSI=1;
  RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 0);
 

for (int ii=Bars; ii>0; ii--)

Indicator may not have a value for bar 0, as specified in your iCustom call

 

Hi!

Thanks for your comment. I did try different 0, 1, and 2 but i still received 0 value at all time. I believe the indicator have value for bar 0

this is the init() in the indicator code:

SetIndexBuffer(0,dUpRsiBuffer);
SetIndexBuffer(1,dDownRsiBuffer);
SetIndexBuffer(2,dSellBuffer);

 

"I believe the indicator have value for bar 0"

Upon what do you base this belief?

Examine the indicator code mentioned above.

 

I am not very sure, however what do success me to do to make it work. i am new at this

thanks

 

If you are new, keep your money in your pocket until you are not so new...

The indicator has no values in bar 0

Change this in your EA:

RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 1);

That might help

 

Thanks for helping me to learn. However i did try 0,1, and 2 for the last number but it is still return 0 value.

double RSI;
RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 1);

Comment("\RSI: ", RSI);

 
Perhaps you should try to rename the indicator file to something with only alphanumerical characters, just in case the file handling subsystem takes offense to the brackets and/or the period. (Though, you would probably have gotten some error message in the journal or experts tabs in that case)
 

Are you saying

"I have only noted 0 as a return value",

or...

Are you saying

"When there is a SIGNAL ( arrow ) on bar 1 of the chart then

RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 1);

is still showing 0".

As a sanity check, what do you expect to see for a value?

 

I mean "I have only noted 0 as a return value".

I did try to comment out the value when there is a singnal (arrow) appear on the chart and I noted that the value (for ex 1.4185) will remain unchance untill the next arrow pop up. So i expect when i call the indicator i have to see the value 1.4185 unchance untill the next arrow appear than i will get another the value.

thanks

 
myfuture2025:

I mean "I have only noted 0 as a return value".

I did try to comment out the value when there is a singnal (arrow) appear on the chart and I noted that the value (for ex 1.4185) will remain unchance untill the next arrow pop up. So i expect when i call the indicator i have to see the value 1.4185 unchance untill the next arrow appear than i will get another the value.

thanks


No, they way I see the code, you get a value only when the signal is at bar 1. You haven't shown your code, only the indicator, and this one line of your code:

RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 1);

It looks at index 2 bar 1, if there is an arrow, there is a value, if not, it gives 0.

The values will be the high of bar 1 + 2 pips if the upper upper arrow is present, low of bar 1 - 4 pips if the lower arrow is present

Reason: