Indicators: VWAP Custom Position - page 3

 

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)

 
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.

 
Great, thanks
 
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!
 
Kevin Mizen #:
I made a few changes and it seems to be working well now.
How can I change the position of the magenta arow (see attached screenshot) and get the curve of AVWAP? Thanks in advance for your reply!
Files: