Convert Candle Suite and Volume Suite Indicators to MT5 (PVSRA Method)

Enivid

Administrator
Staff member
Nov 30, 2008
15,991
803
144
Odessa
www.earnforex.com
I don't believe in volume trading in Forex, but these indicators have been very interesting to convert from MT4 to MT5. I also took the liberty to convert some of the input parameters to enums.
Here is the Candles Suite with PVA display:
Candle Suite MT5.png

And here is the Volume Suite with the default PVA view:
Volume Suite MT5.png

@aphong Please test it and let me know if it works for you.
 

Attachments

jali

Newbie
Apr 16, 2020
9
0
1
31
I don't believe in volume trading in Forex, but these indicators have been very interesting to convert from MT4 to MT5. I also took the liberty to convert some of the input parameters to enums.
Here is the Candles Suite with PVA display:
View attachment 15956

And here is the Volume Suite with the default PVA view:
View attachment 15955

@aphong Please test it and let me know if it works for you.

thank you very much, i think its an updated version of bettervolume indicator right...

Please can you add option to choose Tick or Real volume in case you will use it in futures market.

and also add the option Lookback, to choose how many bars .
 
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
15,991
803
144
Odessa
www.earnforex.com
thank you very much, i think its an updated version of bettervolume indicator right...

Please can you add option to choose Tick or Real volume in case you will use it in futures market.

and also add the option Lookback, to choose how many bars .

I will probably get to this sometime in the future, but you can easily swap Real Volume for Tick Volume by renaming the parameters of the OnCalculate() handler - change the current const long& Volume[], to const long& tick_volume[], and then change const long& volume[], to const long& Volume[],.
 

jali

Newbie
Apr 16, 2020
9
0
1
31
I will probably get to this sometime in the future, but you can easily swap Real Volume for Tick Volume by renaming the parameters of the OnCalculate() handler - change the current const long& Volume[], to const long& tick_volume[], and then change const long& volume[], to const long& Volume[],.

THANKS for your quick answer
But believe me i dont know about coding at all, i dont know to do that.
anyways thank you
 

gonnabetter

Trader
Jul 22, 2020
4
1
8
34
I don't believe in volume trading in Forex, but these indicators have been very interesting to convert from MT4 to MT5. I also took the liberty to convert some of the input parameters to enums.
Here is the Candles Suite with PVA display:
View attachment 15956

And here is the Volume Suite with the default PVA view:
View attachment 15955

@aphong Please test it and let me know if it works for you.
wow , I was looking for PVRSA MT5 version indicators for a long time, thanks for sharing these gems .
 

gonnabetter

Trader
Jul 22, 2020
4
1
8
34
I don't believe in volume trading in Forex, but these indicators have been very interesting to convert from MT4 to MT5. I also took the liberty to convert some of the input parameters to enums.
Here is the Candles Suite with PVA display:
View attachment 15956

And here is the Volume Suite with the default PVA view:
View attachment 15955

@aphong Please test it and let me know if it works for you.
It seems that there is a difference in the formula you used in MT5, in the lower TFs there are a lot of difference between the original indicator and the one you converted to MT5 , here is a screenshot of my platforms which both are from the same broker with the same volume for each candle but as you see the colors are different :

I would be thankful if you take a look at your MT5 source code and see what is the problem .

ps : this is the original formula of candles :

Situation "Climax": When volume >= 200% of the average volume of the 10 previous chart TFs or where the product of candle spread x candle volume is >= the highest for the 10 previous chart time Tfs. (Default Colors: Bull bars are green and bear bars are red. )
Situation "Volume Rising ": When volume >= 150% of the average volume of the 10 previous chart Tfs. (Default Colors: Bull bars are blue and bear are blue-violet. )
 

Attachments

Last edited:
  • Like
Reactions: Enivid

Enivid

Administrator
Staff member
Nov 30, 2008
15,991
803
144
Odessa
www.earnforex.com
It seems that there is a difference in the formula you used in MT5, in the lower TFs there are a lot of difference between the original indicator and the one you converted to MT5 , here is a screenshot of my platforms which both are from the same broker with the same volume for each candle but as you see the colors are different :

I would be thankful if you take a look at your MT5 source code and see what is the problem .

ps : this is the original formula of candles :

Situation "Climax": When volume >= 200% of the average volume of the 10 previous chart TFs or where the product of candle spread x candle volume is >= the highest for the 10 previous chart time Tfs. (Default Colors: Bull bars are green and bear bars are red. )
Situation "Volume Rising ": When volume >= 150% of the average volume of the 10 previous chart Tfs. (Default Colors: Bull bars are blue and bear are blue-violet. )
I'll look into it. Thanks for reporting!
 
  • Like
Reactions: gonnabetter

Enivid

Administrator
Staff member
Nov 30, 2008
15,991
803
144
Odessa
www.earnforex.com
It seems that there is a difference in the formula you used in MT5, in the lower TFs there are a lot of difference between the original indicator and the one you converted to MT5 , here is a screenshot of my platforms which both are from the same broker with the same volume for each candle but as you see the colors are different :

I would be thankful if you take a look at your MT5 source code and see what is the problem .

ps : this is the original formula of candles :

Situation "Climax": When volume >= 200% of the average volume of the 10 previous chart TFs or where the product of candle spread x candle volume is >= the highest for the 10 previous chart time Tfs. (Default Colors: Bull bars are green and bear bars are red. )
Situation "Volume Rising ": When volume >= 150% of the average volume of the 10 previous chart Tfs. (Default Colors: Bull bars are blue and bear are blue-violet. )
The formulas are the same in MT5 and in MT4 versions. However, are you sure that the volumes are the same in your MT4 and MT5 platforms? They might look the same but be quite different. For example, in my MT4, gold has volume of about ~1000 per bar:

mt4-gold-volume.png

While, my MT5 gold has volume about ~100 per bar:

mt5-gold-volume.png
 
  • Like
Reactions: gonnabetter

gonnabetter

Trader
Jul 22, 2020
4
1
8
34
I checked this issue, the number of ticks ( volume ) is different in MT4 and MT5 but the length of histogram is just the same in my broker when I compare MT4 and MT5 volumes , and as you know this indicator works based on the 10 bars moving average and I believe it doesn't matter if the volume is multiple of 100 or 1000 .
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,991
803
144
Odessa
www.earnforex.com
Are you sure they are just multiplied by 100? That's not the case in my platforms - MT5 volumes differ somewhat from MT4 even if you account for some multiplier.

You can check if some bar indeed should have been colored by wasn't by looking at the volume for each of the preceding candle, writing it down, and then calculation its average multiplied by 1.5. Then, check it against the volume of the candle in question.
 
  • Like
Reactions: gonnabetter