Different data from Indicator and iCustom ??

 

Hi, I have had this problem bugging me for two weeks and I just can't figure it out:

Made a special 'compund' indicator with one combined output (graph)...works great.

But when I run the same calculations in the EA (obviously using arrays instead of the indicator buffers)

 and drawing it using Trendlines I get a very different result. There seems to be some some rough

simmilarities but basically it is way off. The Trendline draw graph function is verified to work correctly.

I suspect the pure indicator and the iCustom in the EA is running on different Bar data...

Is this possible?? Any other idea as to what is going on ?

 
DayTrader:

Hi, I have had this problem bugging me for two weeks and I just can't figure it out:

Made a special 'compund' indicator with one combined output (graph)...works great.

But when I run the same calculations in the EA (obviously using arrays instead of the indicator buffers)

 and drawing it using Trendlines I get a very different result. There seems to be some some rough

simmilarities but basically it is way off. The Trendline draw graph function is verified to work correctly.

I suspect the pure indicator and the iCustom in the EA is running on different Bar data...

Is this possible?? Any other idea as to what is going on ?


Arrrgh... It was the ArraySetAsSeries (or lack of it) that did it, so I read the data backwards!

Works now.

Reason: