Volume indicator hourly based - page 2

 
pitu:
I was searching a volume indicator where I could see the average volume for a concrete hour. I haven't found anything.
double SmaVolumeHr(int length, int iShift){
    int     iLimit  = Bars - 1,
            hr      = TimeHour(Time[iShift]);
    double  sum     = 0;    int nSum = 0;
    for(; iShift < iLimit; iShift++){
        if (hr == TimeHour(Time[iShift]){   
            sum += Volume[iShift]; nSum++;
            if (nSum == length) break;
        }
    }
    if (nSum == 0) nSum=1;
    return(sum/nSum);
}
 
Thank you both, I am very grateful for your contributions, I will try to finish it soon.

It's a pleasure to read your answers
 

Hi dudes,

The indicator is ready, but unfortunately I have a strange trouble, I use 4 buffers (4 colors on my chart) and the MA only works for one buffer.... Can I programme a MA for all my Buffers? Can I do it manually without programming??

Thanks again masters

 
pitu:
Can I programme a MA for all my Buffers?
Can I do it manually without programming??
  1. I don't know, can you program? No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
  2. Nope.
 
WHRoeder:
  1. I don't know, can you program? No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
  2. Nope.

I'm just asking a simple question, I have tried to do a MA manually and I have a problem because I have 4 buffers working together. As you can see we are in a mql4 programming forum, I can code a MA for one buffer, but i'm not sure if I can do it for all the buffers, so I have asked if someone know if I can code it. I'm not asking for a code, I just want to know if it's possible. I don't understand why I can't ask that kind of doubts in a mql4 forum... Is this a only pr0s without questions forums? Or maybe is a forum to ask doubts?

have fun

 
pitu:

I'm just asking a simple question,

I have tried to do a MA manually and I have a problem because I have 4 buffers working together. As you can see we are in a mql4 programming forum, I can code a MA for one buffer, but i'm not sure if I can do it for all the buffers,

so I have asked if someone know if I can code it. I'm not asking for a code, I just want to know if it's possible.

I don't understand why I can't ask that kind of doubts in a mql4 forum...

  1. VERY simple. Had you bothered to read the documentation and learn you would have KNOWN the answer.
  2. You already know how to do a MA of a buffer. You currently have 4 buffers. How many buffers are allowed in a indicator? See #1.
  3. And I answered that question "can you program?"
  4. You didn't ask a mql4 question like "what's the maximum number of buffers that can be displayed - I have 4 signal and need 4 MAs" That would have shown you do know how to code and what to code and are just lazy to look up the answer. But you asked "Can I programme a MA for all my Buffers?" And the answer to that question is "can you program?"
Reason: