
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
Here's the code, not much to show at the moment as the indicator shows the wrong value as I said.
Best regards Steve
No, nothing like that ( which is the way a null value is represented I think? ).
The values are just not the same value as I can see on the indicator for the chart. Here's an example.
This is the indicator on a GbpUsd Daily chart, the value for the 14/1/2013 seems to be 1.6471
http://c2n.me/jgYmtF.png
Here's the EA on the GbpUsd daily chart. The value being reported on the 15/1 for the previous days bar is 1.674
http://c2n.me/jgYrJk.png
Best regards Steve
1.6471
Interestingly when I stop the EA and the indicator paints. It doesn't paint the indicator at 1.674 so I have no idea where it is getting this value from. Also while the painted indicator is broadly similar to the indicator placed directly on the chart it doesn't appear to be exactly the same. I'm wondering whether there is an issue with the final indicator. I'll attach the version I'm currently using below.
http://c2n.me/jgZamC.png
Thanks, okay I've read that. I understand the concept that the bars are numbered in the other direction. Unfortunately I'm not sure how to apply this to the indicator and why the indicator seems to be calculating correctly when placed directly onto a chart but is not calculating correctly when referenced from within iCustom.
Best regards Steve
All the quote-arrays of mt4 are set 'the other way round' - therefore mt4 provide ArraySetAsSeries(), read about it in your mt4 reference and follow the link behind timeseries to "Access to Timeseries and IndicatorData"
You are absolutely right.
Stevetrade should also consider using additional buffers instead of arrays as the resizing and set as series is done automatically.
Okay, so if I'm understanding correctly, and apologies for my denseness.
I should not use arrays. I should declare a buffer for each pair I wish to take the values for and then use the buffers for the calculation, outputting to the final buffer which I wish to show on the chart?
Best regards Steve