Indicators: VWAP Custom Position - page 4

 

I figured it out! Ignore the previous comments and do the following:


1. Replace line 133 with:

// Previous line was `iVolume[i]=(double)volume[i];`
iVolume[i]=(double)tick_volume[i];


2. Replace line 159 with:

// Previous line was `vwapBuffer[i]= sumPrice/sumVol;`
if (sumVol > 0) vwapBuffer[i]= sumPrice/sumVol;
 
Hi I have made all the changes but still no luck , can't you load the upgraded one . Thanks
 
with the modifications it works fine, thanks to all.
 
VolNoob #: could you please help me
  1. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

  2. Exponential requires 3.45×(Length+1) bars to converge to 1/10 percent. (EMA Period 5 requires 21 initial bars.)
              Moving average - Wikipedia

    Never use the equation c=(1-a)p + (a)v as it amplifies round off errors. Use the rewritten and simpler equation c=p + a(v-p)

[Deleted]  
William Roeder #:
  1. Exponential requires 3.45×(Length+1) bars to converge to 1/10 percent. (EMA Period 5 requires 21 initial bars.)
              Moving average - Wikipedia

    Never use the equation c=(1-a)p + (a)v as it amplifies round off errors. Use the rewritten and simpler equation c=p + a(v-p)

i appreciate your kind help, you are right and i solved the problem myself.

thank you.

 
It's a good indicator. I was looking for an anchorable vwap and this one fits the bill very well. The only problem is that the line drops vertically on the last candle of the chart when you include the vwap. As if the last value calculated was zero. And from then on it no longer calculates for the following candles.
 
Great, thanks
 
ATTENTION: In version 5.00 build 4272, the indicator crashes MT5. I have not been able to identify the reason. Programming laymen, DO NOT USE THIS INDICATOR until the developer identifies and corrects the problem. MT5 crashes and closes, not allowing you to delete the indicator.
 
I made a few changes and it seems to be working well now.
Files:
AVWAP_Arrow.mq5  25 kb
 
José Ricardo Magalhães #:

Bug free code

After uploading this indicator, I only get an arrow (like the red arrow in the screenshot attached). I can neither change the position of the arrow, nor I see a curve with the calculated VWAP line. Many thanks in advance for your help!