Problem with a custom indicator (won't refresh it self automaticly...)
Karish: won't refresh it self automaticly...
ma_future= iMA(NULL, 0,MA, -1, 2, PRICE_CLOSE,i);
You can't look at the future when i == 0.- Basing an indicator that looks at future bars is called repainting. Useless for trading.
- You look back 9 bars, so do your look back correctly// if(counted_bars>0) counted_bars--; unnecessary Contradictory information on IndicatorCounted() - MQL4 forum
//----
// limit=bars-counted_bars; no look back
limit=bars-MathMax(9,counted_bars); // look back = 9
// for(i=0; i<=limit; i++) when counted=0 you access High[Bars]
// array exceeded, indicator dies.
for(i=1; i< limit; i++)
{
counter=i;
Range=0;
AvgRange=0;
for(counter=i ;counter<=i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
thank you for your replay, i still can't solve this problem though.., can you maybe upload the complete fixed code for me please if you can
i did tried to change those things you highlighted but now it won't show any arrows until i switch TFs...
thank you again, hope to hear from you soon.
someone please..?
still cant get it to work properly please can someone post the right code..?, thank you

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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
TOPIC,
please help if you can, godbless