Download MetaTrader 5
To add comments, please log in or register
Do you know that MQL5 has classes?
Karish
133
Karish 2014.12.04 15:18 

TOPIC,

please help if you can, godbless

Files:
iz.mq4 5 kb
whroeder1
13596
whroeder1 2014.12.04 19:11  
Karish: won't refresh it self automaticly...
  1.       ma_future= iMA(NULL, 0,MA, -1, 2, PRICE_CLOSE,i);
    You can't look at the future when i == 0.
  2. Basing an indicator that looks at future bars is called repainting. Useless for trading.
  3. 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]);
Karish
133
Karish 2014.12.05 00:01  

WHRoeder,

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.

Karish
133
Karish 2014.12.06 19:49  
someone please..?
Karish
133
Karish 2014.12.09 23:09  
still cant get it to work properly please can someone post the right code..?, thank you
/
To add comments, please log in or register