iVolume function not working correctly in mq4?
Page 1 of 502 12 LastLast
Results 1 to 10 of 16

Thread: iVolume function not working correctly in mq4?

  1. #1
    Hi guys.

    I've created very straightforward indior where I'm using iVolume function. But looks to me which iVolume is not working correctly! Or maybe I've problem in my own code.
    It is very straightforward.
    Code is checking candles with low volume on several pairs too and counting (adding) that in varying mMinCandleCount.
    You are able to observe this variable in chart. I had been believing that everything is nice but one day I've opened charts with pairs that I'm checking and execute this indi on most of this pairs and following several candles later I've discovered that number of the variable that's counting this very low volume candles is NOT same on each chart!!!
    For example I've on EU and EJ 240 counts but on a different EG EF and AJ 256 etc..
    Can anybody tell me what is occurring because I think that iVolume maybe is not working properly BUT also maybe I've wrong coding
    Please help men.

    Many Thanks!!!
    https://forexintuitive.com/attachmen...1187327267.mq4

  2. #2
    Quote Originally Posted by ;
    Remember that all pairs do not receive their actual time tick at the same time... so the refreshing of your actual time count may not be exactly the same on all charts. Example if EU receive a tick before EJ, the EU chart update the displayed value only with the older EJ count. When EJ receive its own tick, it refresh its display... but it is different than the one exhibiting on EU. I feel that my explanation isn't quite clear ... but you get the idea.
    THX.
    However, when I've function in my indi that are checking this variable only when new candle is open (rather than on each tick)?? Subsequently it will be not information for all pairs? Mq4 is not checking code on each candle open but only when there is price motion?? For instance: EU didn't have change on it price for 2 preceding one min candles... my code won't run for these two candles at all??

    THX for help

  3. #3
    All pairs do not open their new candle at the exact same moment. I mean that the 1st tick of the pairs doesn't come at the exact same moment.

  4. #4
    Quote Originally Posted by ;
    All pairs don't open their new candle at the exact same moment. I mean the 1st tick of these pairs does not come at the exact same moment.
    And this is common on all TFs charts or just on those lower TF such as 1M and 5M charts?
    When yes. Is there any way how I could get correct information about that Volume? Since my indo is working together with chief thought that's comparing several pairs collectively and when there is no way how I could get correct info then whole indi is futile

  5. #5
    I've also second Q.

    If this isn't working due to that real time tick problem why it's working when I'm not using loop coding but only straightforward coding? Something like this:

    Inserted Code if((mVolumeSymbol11 lt; mVolumeSymbol12) (mVolumeSymbol11 lt; mVolumeSymbol13)) mLowVolSymbol1 = 1; if((mVolumeSymbol21 lt; mVolumeSymbol22) (mVolumeSymbol21 lt; mVolumeSymbol23)) mLowVolSymbol2 = 1; if((mVolumeSymbol31 lt; mVolumeSymbol32) (mVolumeSymbol31 lt; mVolumeSymbol33)) mLowVolSymbol3 = 1; etc If I'm using this style of coding I'm getting same counting on all pairs but problem with this coding is that when I'm checking 10 pairs code Is Actually long and cluttered Therefore I've started to use arrays with loops but then I can't get appropriate results

    thx

  6. #6
    Quote Originally Posted by ;
    quote and this is not uncommon on all TFs charts or only on these decrease TF such as 1M and 5M charts?
    When a tick comes for EURUSD, it is the exact same tick for all EURUSD timeframes.

    My point was that a tick for EURUSD along with a tick for EURJPY (or any other symbol) do not come together in the exact same moment.

  7. #7
    Quote Originally Posted by ;
    quote When a tick comes for EURUSD, it's the same tick for all EURUSD timeframes. My point was that a tick for EURUSD along with a tick for EURJPY (or any other symbol) don't come together in the exact same time.
    Yes I understand it.
    However, I still don;t get it why it isn't working with loop programming
    Since when candle 1 is shut and also have candle 0 is running candle 1 has final volume information it will not change in time only thing is that code is waiting after initial signal will come to candle 0 and it will assess info regarding volume on candle 1.
    For example in 5M chart:
    in EU pair first tick on candle 0 will come on 02 sec and on EJ it'll come on 05sec BUT volume on candle 1 on both pairs are done they are not changing because now indi is counting volume on candle 0 not only on candle 1... For indi it must be same if it's calculating volume from candle 1 in 02 sec after closing of the candle or 05sec after closing of that candle...
    Since when I am doing back testing and I am assessing volume information on chart this volume information isn't same with volume information exactly what indi is offering me.
    Or what I am overlooking??

  8. #8
    Quote Originally Posted by ;
    quote . . .Because when candle 1 is shut and also have candle 0 is running candle 1 has final volume information it will not alter
    To be frank, I did not look too closely the entire code... But you're correct if the values you're looking at are from candles shut, so numbers should be the same no matter the symbol your indior is applied on...

  9. #9
    Quote Originally Posted by ;
    quote To be frank, I did not look too closely the entire code... But you're correct if the values you're looking at are out of candles closed, so amounts should be the exact same no matter the symbol your indior is put on...
    Just...
    and my issue is that with easy coding it is working fine like I have mentioned early. But after using this easy loop coding I am getting wrong result.
    Can be the problem in
    function? That code isn't adding right numbers on this variable? Exactly this portion of code. .
    Inserted Code void CountMinVolCandle() for(int n = 0; n lt; mNoPrs; n ) if(mLowVol#91;n#93;#91;0#93; == 1) mMinCandleCount ; return;

  10. #10
    Hi guys.
    Is there some function I can use for see real ticks on charts? Or maybe some function that will reset tick count?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information