Constant Volume Candles Chart for ProOrder
Forums › ProRealTime English forum › ProOrder support › Constant Volume Candles Chart for ProOrder
- This topic has 6 replies, 4 voices, and was last updated 11 months ago by Jean FX.
-
-
12/20/2023 at 11:18 AM #225505
Hi,
As Constant Volume candles are not available for ProOrder, i tried to work on a code to develop an indicator that could be used to place orders through a ProOrder Strategy. However, i couldn’t make it work.
It seems to not display the candles properly, therefore i must make mistake in the candles parameters calculations but i can’t find the solution.
Here is the draft i started, can anyone help me to make that work properly ?
Thanks a lot in advance !
Constant Volume Candles Indicator123456789101112131415161718192021222324252627282930313233343536373839404142434445// Paramètres de l'indicateurvolumeSeuil = 10000 // Volume seuil pour chaque bougie// VariablescumulVolume = 0 // Cumul du volumedebutBougie = UNDEFINED // Début de la bougie à volume constantbougieEnCours = 0 // Indicateur si une bougie est en cours de formation (0 pour non, 1 pour oui)openBougie = 0highBougie = 0lowBougie = 0closeBougie = 0// Calcul des bougies à volume constantFOR i = 0 TO BarIndexcumulVolume = cumulVolume + volume[i]IF cumulVolume >= volumeSeuil THENIF debutBougie = UNDEFINED THENdebutBougie = iopenBougie = open[i]highBougie = high[i]lowBougie = low[i]ELSEhighBougie = MAX(highBougie, high[i])lowBougie = MIN(lowBougie, low[i])ENDIFcloseBougie = close[i]bougieEnCours = 1ENDIFIF bougieEnCours = 1 AND (cumulVolume >= volumeSeuil OR i = BarIndex) THEN// Affichage de la bougieDRAWCANDLE(openBougie, highBougie, lowBougie, closeBougie) COLOURED (255, 0, 0)// Réinitialisation pour la prochaine bougiedebutBougie = UNDEFINEDcumulVolume = 0bougieEnCours = 0// Réinitialiser highBougie et lowBougie pour la prochaine bougiehighBougie = UNDEFINEDlowBougie = UNDEFINEDENDIFNEXTRETURN12/20/2023 at 1:25 PM #22551012/20/2023 at 1:38 PM #22551212/20/2023 at 2:34 PM #225516Hi Fabien,
That’s right, the non-time related timeframes don’t work with pro-order…
Do you think your indicator will work with pro-order…?
(A “good” indicator for this will have to be based on “tick-data” which is also not time related…)
12/20/2023 at 2:50 PM #22551712/20/2023 at 3:00 PM #22551912/20/2023 at 4:29 PM #225546As far as I know, it’s impossible to reproduce this constant volume indicator using a linear unit of time, which is the only choice available in autotrading.
It is the principle of this indicator to be dependent only on volume and not on time.1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on