Volume Better(Evolution)
Forums › ProRealTime forum Français › Support ProBuilder › Volume Better(Evolution)
- This topic has 12 replies, 2 voices, and was last updated 6 years ago by Alai-n.
-
-
12/08/2017 at 9:01 AM #55034
Bonjour,
Serait-il possible d’envisager une évolution pour le code “Volume Better” avec un affichage sur les bougies en + d’un affichage fenêtre indicateur ???
Exemple ci-joint : http://emini-watch.com/free-stuff/volume-indicator/
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184// Better Volume Indicator// Original idea by emini-watch.com// Source : http://emini-watch.com/free-stuff/volume-indicator/ AND http://emini-watch.com/category/volume-indicator/// Rewrite for ProRealTime / ChartNet / CMC by Dutchy, march 2009// Code is provided as public domain, no warranty.// You can find Dutchy on following fora// http://www.aktienboard.com/forum/f29/prorealtime-cmc-script-programmierung-t94783/// http://www.pro-at.com/forums-bourse/sujet-Forums-Partenaires-Forum-ProRealTime-92.html// Peace// Better Volume Indicator - Summary// ClimaxUp (Red) : Top, Start Up Trend, Down Trend Continue// ClimaxDown (White): Bottom, Up Trend Continue, Start Down Trend// LowVolume (Yellow): Bottom, Top, Up Trend Continue// Churn (Green): Bottom, Top, Down Trend Continue// ClimaxChurn (Magenta): Top, Down Trend Continue// Parameter: History = Boolean// Parameter: Use2Bars = Boolean// Parameter: Lookback = 20ONCE Condition1 = 0ONCE Condition2 = 0ONCE Condition3 = 0ONCE Condition4 = 0ONCE Condition5 = 0ONCE Condition6 = 0ONCE Condition7 = 0ONCE Condition8 = 0ONCE Condition9 = 0ONCE Condition10 = 0ONCE Condition11 = 0ONCE Condition12 = 0ONCE Condition13 = 0ONCE Condition14 = 0ONCE Condition15 = 0ONCE Condition16 = 0ONCE Condition17 = 0ONCE Condition18 = 0ONCE Condition19 = 0ONCE Condition20 = 0VolValue = VolumeLowVolValue = VolValueClimaxUpValue = VolValueClimaxDownValue = VolValueChurnValue = VolValueClimaxChurnValue = VolValueStopVolValue = VolValueTrampolineValue = VolValueAVVolume = Average[Lookback*2](VolValue)IF History = 0 THENBI = 400ELSIF History = 1 THENBI = LookbackENDIFIF BARINDEX > BI AND Volume <> 0 THENIF Close > Open THENValue1 = Volume * (Range / (2 * Range + Open - Close))ELSIF Close < Open THENValue1= Volume * ((Range + Close - Open) / (2 * Range + Close - Open))ENDIFIF Close = Open THENValue1 = 0.5 * VolumeENDIFValue2 = Volume - Value1Value3 = Value1 + Value2Value4 = Value1 * RangeValue5 = (Value1 - Value2) * RangeValue6 = Value2 * RangeValue7 = (Value2 - Value1) * RangeIF Range <> 0 THENValue8 = Value1 / RangeValue9 = (Value1 - Value2) / RangeValue10 = Value2 / RangeValue11 = (Value2 - Value1) / RangeValue12 = Value3 / RangeENDIFValue13 = Value3 +Value3[1]Value14 = (Value1+Value1[1]) * (Highest[2](High) - Lowest[2](Low))Value15 = (Value1+Value1[1] - Value2 - Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value16 = (Value2 + Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value17 = (Value2 + Value2[1] - Value1 - Value1[1]) * (Highest[2](High) - Lowest[2](Low))IF Highest[2](High) <> Lowest[2](Low) THENValue18 = (Value1 + Value1[1]) / (Highest[2](High) - Lowest[2](Low))ENDIFValue19 = (Value1 + Value1[1] - Value2 - Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value20 = (Value2 + Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value21 = (Value2 + Value2[1] - Value1 - Value1[1]) / (Highest[2](High) - Lowest[2](Low))Value22 = Value13 / (Highest[2](High) - Lowest[2](Low))IF Use2Bars = 0 THENCondition1 = Value3 = Lowest[Lookback](Value3)Condition2 = Value4 = Highest[Lookback](Value4) AND Close > OpenCondition3 = Value5 = Highest[Lookback](Value5) AND Close > OpenCondition4 = Value6 = Highest[Lookback](Value6) AND Close < OpenCondition5 = Value7 = Highest[Lookback](Value7) AND Close < OpenCondition6 = Value8 = Lowest[Lookback](Value8) AND Close < OpenCondition7 = Value9 = Lowest[Lookback](Value9) AND Close < OpenCondition8 = Value10 = Lowest[Lookback](Value10) AND Close > OpenCondition9 = Value11 = Lowest[Lookback](Value11) AND Close > OpenCondition10 = Value12 = Highest[Lookback](Value12)ELSIF Use2Bars = 1 THENCondition11 = Value13 = Lowest[Lookback](Value13)Condition12 = Value14 = Highest[Lookback](Value14) AND Close > Open AND Close[1] > Open[1]Condition13 = Value15 = Highest[Lookback](Value15) AND Close > Open AND Close[1] > Open[1]Condition14 = Value16 = Highest[Lookback](Value16) AND Close < Open AND Close[1] < Open[1]Condition15 = Value17 = Highest[Lookback](Value17) AND Close < Open AND Close[1] < Open[1]Condition16 = Value18 = Lowest[Lookback](Value18) AND Close < Open AND Close[1] < Open[1]Condition17 = Value19 = Lowest[Lookback](Value19) AND Close < Open AND Close[1] < Open[1]Condition18 = Value20 = Lowest[Lookback](Value20) AND Close > Open AND Close[1] > Open[1]Condition19 = Value21 = Lowest[Lookback](Value21) AND Close > Open AND Close[1] > Open[1]Condition20 = Value22 = Highest[Lookback](Value22)ENDIF// *********************************************************************************************IF (Condition1 or Condition11) THEN // YellowLowVol = LowVolValueELSELowVol = 0ENDIFIF (Condition2 or Condition3 or Condition8 or Condition9 or Condition12 or Condition13 or Condition18 or Condition19) THEN // RedClimaxUp = ClimaxUpValueIF LowVol <> 0 THENClimaxUp = ClimaxUpValue / 2ENDIFELSEClimaxUp = 0ENDIFIF (Condition4 or Condition5 or Condition6 or Condition7 or Condition14 or Condition15 or Condition16 or Condition17) THEN // WhiteClimaxDown = ClimaxDownValueIF LowVol <> 0 OR ClimaxUp <> 0 THENClimaxDown = ClimaxDownValueENDIFELSEClimaxDown = 0ENDIFIF (Condition10 or Condition20) THEN // GreenChurn = ChurnValueIF LowVol <> 0 OR ClimaxUp <> 0 OR ClimaxDown <> 0 THENChurn = ChurnValue / 2ENDIFELSEChurn = 0ENDIF//IF (Condition10 or Condition20) AND (Condition2 or Condition3 or Condition4 or Condition5 or Condition6 or Condition7 or Condition8 or Condition9 or Condition12 or Condition13 or Condition14 or Condition15 or Condition16 or Condition17 or Condition18 or Condition19) THENIF Churn <> 0 AND (ClimaxUp <> 0 OR ClimaxDown <> 0) THEN // MagentaClimaxChurn = ClimaxChurnValueELSEClimaxChurn = 0ENDIF//StopVolumeLocalClosingPosition = 1 - (High - Close) / (High - Low)IF Volume > Volume[1] AND Range < Range[1] AND ((High > High[1] AND LocalClosingPosition < 0.4) OR (Low < Low[1] AND LocalClosingPosition > 0.6)) THENStopVol = StopVolValue * 1 / 3 // HigherVolume & LowerRange @ HigherHigh or LowerLow - DBlueELSEStopVol = 0ENDIF//TrampolineFOR i = 1 TO 2 // Close togetherIF ((ClimaxChurn[i] > 0 OR ClimaxUp[i] > 0) AND (ClimaxChurn > 0 OR ClimaxUp > 0)) AND ((Close[i] > Open[i] AND Close < Open) OR (Close[i] < Open[i] AND Close > Open)) THENTrampoline = TrampolineValue * 1 / 4BREAKELSETrampoline = 0ENDIFNEXTENDIFRETURN Volume COLOURED (0, 200, 200) AS "Volume (LBlue)", LowVol COLOURED (255, 255, 0) AS "LowVol (Yellow Histo): Bottom & Top & UpTrend Cont",ClimaxUp COLOURED (255, 0, 0) AS "Climax Up (Red Histo): Start UpTrend & Top & DownTrend Cont", ClimaxDown COLOURED (255, 255, 255) AS "ClimaxDown (White Histo): Bottom & UpTrend Cont & Start Down Trend" , Churn COLOURED (0, 155, 50) AS "Churn = HighVol@LowRange (Green Histo): Bottom & Top & Down Trend Cont",ClimaxChurn COLOURED (255, 0, 255) AS "ClimaxChurn (Magenta Histo): Top & DownTrend Cont: Brearish", Trampoline COLOURED (0, 0, 255) AS "Trampoline (DBlue Histo): Reversal", StopVol COLOURED (0, 0, 0) AS "StopVol (Black Histo): Profit Taking", AVVolume COLOURED (255, 0, 0) AS "AVVolume (Red Line)"12/18/2017 at 3:24 PM #5597912/26/2017 at 10:58 AM #5654301/03/2018 at 11:47 PM #5720701/05/2018 at 12:49 AM #5731401/05/2018 at 9:36 AM #57323Désolé pour la réponse tardive, difficile d’être partout surtout durant cette période. Je ne peux pas faire le code pour le moment, mais tu peux essayer avec DRAWCANDLE
Il faut pour cela insérer une instruction drawcandle à chaque détection du better volume. Bon courage.
01/05/2018 at 6:03 PM #57413Je ne sais pas trop comment! Mais j’ai réussi à faire ça(Image 1)
Cpdt des problèmes subsistent :
PB1 : Voir (Image 2)
PB2 : Affichage en BarChart Impossible
Hormis les problèmes, est ce que cela te semble correct???
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193// Better Volume Indicator// Original idea by emini-watch.com// Source : http://emini-watch.com/free-stuff/volume-indicator/ AND http://emini-watch.com/category/volume-indicator/// Rewrite for ProRealTime / ChartNet / CMC by Dutchy, march 2009// Code is provided as public domain, no warranty.// You can find Dutchy on following fora// http://www.aktienboard.com/forum/f29/prorealtime-cmc-script-programmierung-t94783/// http://www.pro-at.com/forums-bourse/sujet-Forums-Partenaires-Forum-ProRealTime-92.html// Peace// Better Volume Indicator - Summary// ClimaxUp (Red) : Top, Start Up Trend, Down Trend Continue// ClimaxDown (White): Bottom, Up Trend Continue, Start Down Trend// LowVolume (Yellow): Bottom, Top, Up Trend Continue// Churn (Green): Bottom, Top, Down Trend Continue// ClimaxChurn (Magenta): Top, Down Trend Continue// Parameter: History = Boolean// Parameter: Use2Bars = Boolean// Parameter: Lookback = 20ONCE Condition1 = 0ONCE Condition2 = 0ONCE Condition3 = 0ONCE Condition4 = 0ONCE Condition5 = 0ONCE Condition6 = 0ONCE Condition7 = 0ONCE Condition8 = 0ONCE Condition9 = 0ONCE Condition10 = 0ONCE Condition11 = 0ONCE Condition12 = 0ONCE Condition13 = 0ONCE Condition14 = 0ONCE Condition15 = 0ONCE Condition16 = 0ONCE Condition17 = 0ONCE Condition18 = 0ONCE Condition19 = 0ONCE Condition20 = 0VolValue = VolumeLowVolValue = VolValueClimaxUpValue = VolValueClimaxDownValue = VolValueChurnValue = VolValueClimaxChurnValue = VolValueStopVolValue = VolValueTrampolineValue = VolValueAVVolume = Average[20*2](VolValue)IF 0 = 0 THENBI = 400ELSIF 1 = 1 THENBI = 20ENDIFIF BARINDEX > BI AND Volume <> 0 THENIF Close > Open THENValue1 = Volume * (Range / (2 * Range + Open - Close))ELSIF Close < Open THENValue1= Volume * ((Range + Close - Open) / (2 * Range + Close - Open))ENDIFIF Close = Open THENValue1 = 0.5 * VolumeENDIFValue2 = Volume - Value1Value3 = Value1 + Value2Value4 = Value1 * RangeValue5 = (Value1 - Value2) * RangeValue6 = Value2 * RangeValue7 = (Value2 - Value1) * RangeIF Range <> 0 THENValue8 = Value1 / RangeValue9 = (Value1 - Value2) / RangeValue10 = Value2 / RangeValue11 = (Value2 - Value1) / RangeValue12 = Value3 / RangeENDIFValue13 = Value3 +Value3[1]Value14 = (Value1+Value1[1]) * (Highest[2](High) - Lowest[2](Low))Value15 = (Value1+Value1[1] - Value2 - Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value16 = (Value2 + Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value17 = (Value2 + Value2[1] - Value1 - Value1[1]) * (Highest[2](High) - Lowest[2](Low))IF Highest[2](High) <> Lowest[2](Low) THENValue18 = (Value1 + Value1[1]) / (Highest[2](High) - Lowest[2](Low))ENDIFValue19 = (Value1 + Value1[1] - Value2 - Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value20 = (Value2 + Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value21 = (Value2 + Value2[1] - Value1 - Value1[1]) / (Highest[2](High) - Lowest[2](Low))Value22 = Value13 / (Highest[2](High) - Lowest[2](Low))IF 0 = 0 THENCondition1 = Value3 = Lowest[20](Value3)Condition2 = Value4 = Highest[20](Value4) AND Close > OpenCondition3 = Value5 = Highest[20](Value5) AND Close > OpenCondition4 = Value6 = Highest[20](Value6) AND Close < OpenCondition5 = Value7 = Highest[20](Value7) AND Close < OpenCondition6 = Value8 = Lowest[20](Value8) AND Close < OpenCondition7 = Value9 = Lowest[20](Value9) AND Close < OpenCondition8 = Value10 = Lowest[20](Value10) AND Close > OpenCondition9 = Value11 = Lowest[20](Value11) AND Close > OpenCondition10 = Value12 = Highest[20](Value12)ELSIF 1 = 1 THENCondition11 = Value13 = Lowest[20](Value13)Condition12 = Value14 = Highest[20](Value14) AND Close > Open AND Close[1] > Open[1]Condition13 = Value15 = Highest[20](Value15) AND Close > Open AND Close[1] > Open[1]Condition14 = Value16 = Highest[20](Value16) AND Close < Open AND Close[1] < Open[1]Condition15 = Value17 = Highest[20](Value17) AND Close < Open AND Close[1] < Open[1]Condition16 = Value18 = Lowest[20](Value18) AND Close < Open AND Close[1] < Open[1]Condition17 = Value19 = Lowest[20](Value19) AND Close < Open AND Close[1] < Open[1]Condition18 = Value20 = Lowest[20](Value20) AND Close > Open AND Close[1] > Open[1]Condition19 = Value21 = Lowest[20](Value21) AND Close > Open AND Close[1] > Open[1]Condition20 = Value22 = Highest[20](Value22)ENDIF// *********************************************************************************************IF (Condition1 or Condition11) THEN // Yellow CandlestickLowVol = LowVolValueDRAWCANDLE(Open,High,Low,Close) COLOURED (255,255,0)ELSELowVol = 0ENDIFIF (Condition2 or Condition3 or Condition8 or Condition9 or Condition12 or Condition13 or Condition18 or Condition19) THEN // Red CandlestickClimaxUp = ClimaxUpValueDRAWCANDLE(Open,High,Low,Close)COLOURED (255,0,0)IF LowVol <> 0 THENClimaxUp = ClimaxUpValue / 2ENDIFELSEClimaxUp = 0ENDIFIF (Condition4 or Condition5 or Condition6 or Condition7 or Condition14 or Condition15 or Condition16 or Condition17) THEN // White CandlestickClimaxDown = ClimaxDownValueDRAWCANDLE(Open,High,Low,Close)COLOURED (255,255,255)IF LowVol <> 0 OR ClimaxUp <> 0 THENClimaxDown = ClimaxDownValueENDIFELSEClimaxDown = 0ENDIFIF (Condition10 or Condition20) THEN // Green CandlestickChurn = ChurnValueDRAWCANDLE(Open,High,Low,Close)COLOURED (0,128,0)IF LowVol <> 0 OR ClimaxUp <> 0 OR ClimaxDown <> 0 THENChurn = ChurnValue / 2ENDIFELSEChurn = 0ENDIF//IF (Condition10 or Condition20) AND (Condition2 or Condition3 or Condition4 or Condition5 or Condition6 or Condition7 or Condition8 or Condition9 or Condition12 or Condition13 or Condition14 or Condition15 or Condition16 or Condition17 or Condition18 or Condition19) THENIF Churn <> 0 AND (ClimaxUp <> 0 OR ClimaxDown <> 0) THEN // Magenta CandelstickClimaxChurn = ClimaxChurnValueDRAWCANDLE(Open,High,Low,Close)COLOURED (255,0,255)ELSEClimaxChurn = 0ENDIF//StopVolumeLocalClosingPosition = 1 - (High - Close) / (High - Low)IF Volume > Volume[1] AND Range < Range[1] AND ((High > High[1] AND LocalClosingPosition < 0.4) OR (Low < Low[1] AND LocalClosingPosition > 0.6)) THENStopVol = StopVolValue * 1 / 3 // HigherVolume & LowerRange @ HigherHigh or LowerLow - DBlueDRAWCANDLE(Open,High,Low,Close)COLOURED (205,92,92)ELSEStopVol = 0ENDIF//TrampolineFOR i = 1 TO 2 // Close togetherIF ((ClimaxChurn[i] > 0 OR ClimaxUp[i] > 0) AND (ClimaxChurn > 0 OR ClimaxUp > 0)) AND ((Close[i] > Open[i] AND Close < Open) OR (Close[i] < Open[i] AND Close > Open)) THENTrampoline = TrampolineValue * 1 / 4BREAKDRAWCANDLE(Open,High,Low,Close)COLOURED (127,255,212)ELSETrampoline = 0ENDIFNEXTENDIFRETURN Volume COLOURED (0, 200, 200) AS "Volume (LBlue)", LowVol COLOURED (255, 255, 0) AS "LowVol (Yellow Histo): Bottom & Top & UpTrend Cont",ClimaxUp COLOURED (255, 0, 0) AS "Climax Up (Red Histo): Start UpTrend & Top & DownTrend Cont", ClimaxDown COLOURED (255, 255, 255) AS "ClimaxDown (White Histo): Bottom & UpTrend Cont & Start Down Trend" , Churn COLOURED (0, 155, 50) AS "Churn = HighVol@LowRange (Green Histo): Bottom & Top & Down Trend Cont",ClimaxChurn COLOURED (255, 0, 255) AS "ClimaxChurn (Magenta Histo): Top & DownTrend Cont: Brearish", Trampoline COLOURED (0, 0, 255) AS "Trampoline (DBlue Histo): Reversal", StopVol COLOURED (0, 0, 0) AS "StopVol (Black Histo): Profit Taking", AVVolume COLOURED (255, 0, 0) AS "AVVolume (Red Line)"01/07/2018 at 2:59 AM #5755701/07/2018 at 3:22 AM #57559Code Volume Better mis au propre au cas où cela intéresserait quelqu’un !
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192// Better Volume Indicator for BarChart// Original idea by emini-watch.com// Better Volume Indicator - Summary// ClimaxUp (Red) : Top, Start Up Trend, Down Trend Continue// ClimaxDown (White): Bottom, Up Trend Continue, Start Down Trend// LowVolume (Yellow): Bottom, Top, Up Trend Continue// Churn (Green): Bottom, Top, Down Trend Continue// ClimaxChurn (Magenta): Top, Down Trend Continue// Parameter: History = Boolean// Parameter: Use2Bars = Boolean// Parameter: Lookback = 20(Default)Lookback = 20ONCE Condition1 = 0ONCE Condition2 = 0ONCE Condition3 = 0ONCE Condition4 = 0ONCE Condition5 = 0ONCE Condition6 = 0ONCE Condition7 = 0ONCE Condition8 = 0ONCE Condition9 = 0ONCE Condition10 = 0ONCE Condition11 = 0ONCE Condition12 = 0ONCE Condition13 = 0ONCE Condition14 = 0ONCE Condition15 = 0ONCE Condition16 = 0ONCE Condition17 = 0ONCE Condition18 = 0ONCE Condition19 = 0ONCE Condition20 = 0VolValue = VolumeLowVolValue = VolValueClimaxUpValue = VolValueClimaxDownValue = VolValueChurnValue = VolValueClimaxChurnValue = VolValueStopVolValue = VolValueTrampolineValue = VolValueAVVolume = Average[Lookback*2](VolValue)//Average[Lookback*2](VolValue)IF 0 = 0 THENBI = 400ELSIF 1 = 1 THENBI = Lookback //BI=LookbackENDIFIF BARINDEX > BI AND Volume <> 0 THENIF Close > Open THENValue1 = Volume * (Range / (2 * Range + Open - Close))ELSIF Close < Open THENValue1= Volume * ((Range + Close - Open) / (2 * Range + Close - Open))ENDIFIF Close = Open THENValue1 = 0.5 * VolumeENDIFValue2 = Volume - Value1Value3 = Value1 + Value2Value4 = Value1 * RangeValue5 = (Value1 - Value2) * RangeValue6 = Value2 * RangeValue7 = (Value2 - Value1) * RangeIF Range <> 0 THENValue8 = Value1 / RangeValue9 = (Value1 - Value2) / RangeValue10 = Value2 / RangeValue11 = (Value2 - Value1) / RangeValue12 = Value3 / RangeENDIFValue13 = Value3 + Value3[1]Value14 = (Value1 + Value1[1]) * (Highest[2](High) - Lowest[2](Low))Value15 = (Value1 + Value1[1] - Value2 - Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value16 = (Value2 + Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value17 = (Value2 + Value2[1] - Value1 - Value1[1]) * (Highest[2](High) - Lowest[2](Low))IF Highest[2](High) <> Lowest[2](Low) THENValue18 = (Value1 + Value1[1]) / (Highest[2](High) - Lowest[2](Low))ENDIFValue19 = (Value1 + Value1[1] - Value2 - Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value20 = (Value2 + Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value21 = (Value2 + Value2[1] - Value1 - Value1[1]) / (Highest[2](High) - Lowest[2](Low))Value22 = Value13 / (Highest[2](High) - Lowest[2](Low))IF 0 = 0 THENCondition1 = Value3 = Lowest [Lookback](Value3)Condition2 = Value4 = Highest[Lookback](Value4) AND Close > OpenCondition3 = Value5 = Highest[Lookback](Value5) AND Close > OpenCondition4 = Value6 = Highest[Lookback](Value6) AND Close < OpenCondition5 = Value7 = Highest[Lookback](Value7) AND Close < OpenCondition6 = Value8 = Lowest [Lookback](Value8) AND Close < OpenCondition7 = Value9 = Lowest [Lookback](Value9) AND Close < OpenCondition8 = Value10 = Lowest [Lookback](Value10) AND Close > OpenCondition9 = Value11 = Lowest [Lookback](Value11) AND Close > OpenCondition10 = Value12 = Highest[Lookback](Value12)ELSIF 1 = 1 THENCondition11 = Value13 = Lowest [Lookback](Value13)Condition12 = Value14 = Highest[Lookback](Value14) AND Close > Open AND Close[1] > Open[1]Condition13 = Value15 = Highest[Lookback](Value15) AND Close > Open AND Close[1] > Open[1]Condition14 = Value16 = Highest[Lookback](Value16) AND Close < Open AND Close[1] < Open[1]Condition15 = Value17 = Highest[Lookback](Value17) AND Close < Open AND Close[1] < Open[1]Condition16 = Value18 = Lowest [Lookback](Value18) AND Close < Open AND Close[1] < Open[1]Condition17 = Value19 = Lowest [Lookback](Value19) AND Close < Open AND Close[1] < Open[1]Condition18 = Value20 = Lowest [Lookback](Value20) AND Close > Open AND Close[1] > Open[1]Condition19 = Value21 = Lowest [Lookback](Value21) AND Close > Open AND Close[1] > Open[1]Condition20 = Value22 = Highest[Lookback](Value22)ENDIF// *********************************************************************************************// Yellow BarChartIF (Condition1 or Condition11) THENLowVol = LowVolValueDRAWBARCHART(Open,High,Low,Close) COLOURED (255,255,0)ELSELowVol = 0ENDIF// Red BarchartIF (Condition2 or Condition3 or Condition8 or Condition9 or Condition12 or Condition13 or Condition18 or Condition19) THENClimaxUp = ClimaxUpValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)IF LowVol <> 0 THENClimaxUp = ClimaxUpValue / 2ENDIFELSEClimaxUp = 0ENDIF// White BarchartIF (Condition4 or Condition5 or Condition6 or Condition7 or Condition14 or Condition15 or Condition16 or Condition17) THENClimaxDown = ClimaxDownValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,255,255)IF LowVol <> 0 OR ClimaxUp <> 0 THENClimaxDown = ClimaxDownValueENDIFELSEClimaxDown = 0ENDIF// Green BarChartIF (Condition10 or Condition20) THENChurn = ChurnValueDRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)IF LowVol <> 0 OR ClimaxUp <> 0 OR ClimaxDown <> 0 THENChurn = ChurnValue / 2ENDIFELSEChurn = 0ENDIF//IF (Condition10 or Condition20) AND (Condition2 or Condition3 or Condition4 or Condition5 or Condition6 or Condition7 or Condition8 or Condition9 or Condition12 or Condition13 or Condition14 or Condition15 or Condition16 or Condition17 or Condition18 or Condition19) THEN// Magenta BarChartIF Churn <> 0 AND (ClimaxUp <> 0 OR ClimaxDown <> 0) THENClimaxChurn = ClimaxChurnValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,255)ELSEClimaxChurn = 0ENDIF//StopVolume Orangered BarChartLocalClosingPosition = 1 - (High - Close) / (High - Low)IF Volume > Volume[1] AND Range < Range[1] AND ((High > High[1] AND LocalClosingPosition < 0.4) OR (Low < Low[1] AND LocalClosingPosition > 0.6)) THENStopVol = StopVolValue * 1 / 3 // HigherVolume & LowerRange @ HigherHigh or LowerLow - DBlueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,69,0)ELSEStopVol = 0ENDIF//Trampoline Blue BarChartFOR i = 1 TO 2 // Close togetherIF ((ClimaxChurn[i] > 0 OR ClimaxUp[i] > 0) AND (ClimaxChurn > 0 OR ClimaxUp > 0)) AND ((Close[i] > Open[i] AND Close < Open) OR (Close[i] < Open[i] AND Close > Open)) THENTrampoline = TrampolineValue * 1 / 4BREAKDRAWBARCHART(Open,High,Low,Close)COLOURED (0,0,255)ELSETrampoline = 0ENDIFNEXTENDIFRETURN Volume COLOURED (0, 200, 200) AS "Volume (LBlue)", LowVol COLOURED (255, 255, 0) AS "LowVol (Yellow Histo): Bottom & Top & UpTrend Cont",ClimaxUp COLOURED (255, 0, 0) AS "Climax Up (Red Histo): Start UpTrend & Top & DownTrend Cont", ClimaxDown COLOURED (255, 255, 255) AS "ClimaxDown (White Histo): Bottom & UpTrend Cont & Start Down Trend" , Churn COLOURED (0, 155, 50) AS "Churn = HighVol@LowRange (Green Histo): Bottom & Top & Down Trend Cont",ClimaxChurn COLOURED (255, 0, 255) AS "ClimaxChurn (Magenta Histo): Top & DownTrend Cont: Brearish", Trampoline COLOURED (0, 0, 255) AS "Trampoline (DBlue Histo): Reversal", StopVol COLOURED (255, 69, 0) AS "StopVol (Orangered Histo): Profit Taking", AVVolume COLOURED (255, 0, 0) AS "AVVolume (Red Line)"01/08/2018 at 5:02 PM #57777Bravo et Merci pour le retour @A-lain, cet indicateur sera sans nulle doute utile pour d’autres. Il pourrait également être ajouté à notre “library” ! Pour cela tu peux utiliser le formulaire de ce lien: https://www.prorealcode.com/itm-settings/
01/08/2018 at 5:18 PM #57782Bonjour Nicolas,
Le code n’est pas tout à fait propre et correct…
Il serait bien que tu y jettes un coup d’œil pour rectifier ce qui dysfonctionne!
Un Exemple : en UT 1 heure il y a des barres verticales qui apparaissent au milieu de l’écran. Ce sont les barres de volumes qui sont en fond! Et alors là, quoi faire je l’ignore!!!
1 user thanked author for this post.
01/08/2018 at 5:27 PM #57785C’est normal puisque tu retournes certaines valeurs dans RETURN, et puisque tu appliques l’indicateur sur le graphique du prix, ces anciens histogrammes de la version originale s’affichent toujours !
Voilà la version corrigée :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192// Better Volume Indicator for BarChart// Original idea by emini-watch.com// Better Volume Indicator - Summary// ClimaxUp (Red) : Top, Start Up Trend, Down Trend Continue// ClimaxDown (White): Bottom, Up Trend Continue, Start Down Trend// LowVolume (Yellow): Bottom, Top, Up Trend Continue// Churn (Green): Bottom, Top, Down Trend Continue// ClimaxChurn (Magenta): Top, Down Trend Continue// Parameter: History = Boolean// Parameter: Use2Bars = Boolean// Parameter: Lookback = 20(Default)Lookback = 20ONCE Condition1 = 0ONCE Condition2 = 0ONCE Condition3 = 0ONCE Condition4 = 0ONCE Condition5 = 0ONCE Condition6 = 0ONCE Condition7 = 0ONCE Condition8 = 0ONCE Condition9 = 0ONCE Condition10 = 0ONCE Condition11 = 0ONCE Condition12 = 0ONCE Condition13 = 0ONCE Condition14 = 0ONCE Condition15 = 0ONCE Condition16 = 0ONCE Condition17 = 0ONCE Condition18 = 0ONCE Condition19 = 0ONCE Condition20 = 0VolValue = VolumeLowVolValue = VolValueClimaxUpValue = VolValueClimaxDownValue = VolValueChurnValue = VolValueClimaxChurnValue = VolValue//StopVolValue = VolValue//TrampolineValue = VolValue//AVVolume = Average[Lookback*2](VolValue)//Average[Lookback*2](VolValue)IF 0 = 0 THENBI = 400ELSIF 1 = 1 THENBI = Lookback //BI=LookbackENDIFIF BARINDEX > BI AND Volume <> 0 THENIF Close > Open THENValue1 = Volume * (Range / (2 * Range + Open - Close))ELSIF Close < Open THENValue1= Volume * ((Range + Close - Open) / (2 * Range + Close - Open))ENDIFIF Close = Open THENValue1 = 0.5 * VolumeENDIFValue2 = Volume - Value1Value3 = Value1 + Value2Value4 = Value1 * RangeValue5 = (Value1 - Value2) * RangeValue6 = Value2 * RangeValue7 = (Value2 - Value1) * RangeIF Range <> 0 THENValue8 = Value1 / RangeValue9 = (Value1 - Value2) / RangeValue10 = Value2 / RangeValue11 = (Value2 - Value1) / RangeValue12 = Value3 / RangeENDIFValue13 = Value3 + Value3[1]Value14 = (Value1 + Value1[1]) * (Highest[2](High) - Lowest[2](Low))Value15 = (Value1 + Value1[1] - Value2 - Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value16 = (Value2 + Value2[1]) * (Highest[2](High) - Lowest[2](Low))Value17 = (Value2 + Value2[1] - Value1 - Value1[1]) * (Highest[2](High) - Lowest[2](Low))IF Highest[2](High) <> Lowest[2](Low) THENValue18 = (Value1 + Value1[1]) / (Highest[2](High) - Lowest[2](Low))ENDIFValue19 = (Value1 + Value1[1] - Value2 - Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value20 = (Value2 + Value2[1]) / (Highest[2](High) - Lowest[2](Low))Value21 = (Value2 + Value2[1] - Value1 - Value1[1]) / (Highest[2](High) - Lowest[2](Low))Value22 = Value13 / (Highest[2](High) - Lowest[2](Low))IF 0 = 0 THENCondition1 = Value3 = Lowest [Lookback](Value3)Condition2 = Value4 = Highest[Lookback](Value4) AND Close > OpenCondition3 = Value5 = Highest[Lookback](Value5) AND Close > OpenCondition4 = Value6 = Highest[Lookback](Value6) AND Close < OpenCondition5 = Value7 = Highest[Lookback](Value7) AND Close < OpenCondition6 = Value8 = Lowest [Lookback](Value8) AND Close < OpenCondition7 = Value9 = Lowest [Lookback](Value9) AND Close < OpenCondition8 = Value10 = Lowest [Lookback](Value10) AND Close > OpenCondition9 = Value11 = Lowest [Lookback](Value11) AND Close > OpenCondition10 = Value12 = Highest[Lookback](Value12)ELSIF 1 = 1 THENCondition11 = Value13 = Lowest [Lookback](Value13)Condition12 = Value14 = Highest[Lookback](Value14) AND Close > Open AND Close[1] > Open[1]Condition13 = Value15 = Highest[Lookback](Value15) AND Close > Open AND Close[1] > Open[1]Condition14 = Value16 = Highest[Lookback](Value16) AND Close < Open AND Close[1] < Open[1]Condition15 = Value17 = Highest[Lookback](Value17) AND Close < Open AND Close[1] < Open[1]Condition16 = Value18 = Lowest [Lookback](Value18) AND Close < Open AND Close[1] < Open[1]Condition17 = Value19 = Lowest [Lookback](Value19) AND Close < Open AND Close[1] < Open[1]Condition18 = Value20 = Lowest [Lookback](Value20) AND Close > Open AND Close[1] > Open[1]Condition19 = Value21 = Lowest [Lookback](Value21) AND Close > Open AND Close[1] > Open[1]Condition20 = Value22 = Highest[Lookback](Value22)ENDIF// *********************************************************************************************// Yellow BarChartIF (Condition1 or Condition11) THENLowVol = LowVolValueDRAWBARCHART(Open,High,Low,Close) COLOURED (255,255,0)ELSELowVol = 0ENDIF// Red BarchartIF (Condition2 or Condition3 or Condition8 or Condition9 or Condition12 or Condition13 or Condition18 or Condition19) THENClimaxUp = ClimaxUpValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,0)IF LowVol <> 0 THENClimaxUp = ClimaxUpValue / 2ENDIFELSEClimaxUp = 0ENDIF// White BarchartIF (Condition4 or Condition5 or Condition6 or Condition7 or Condition14 or Condition15 or Condition16 or Condition17) THENClimaxDown = ClimaxDownValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,255,255)IF LowVol <> 0 OR ClimaxUp <> 0 THENClimaxDown = ClimaxDownValueENDIFELSEClimaxDown = 0ENDIF// Green BarChartIF (Condition10 or Condition20) THENChurn = ChurnValueDRAWBARCHART(Open,High,Low,Close)COLOURED (0,128,0)IF LowVol <> 0 OR ClimaxUp <> 0 OR ClimaxDown <> 0 THENChurn = ChurnValue / 2ENDIFELSEChurn = 0ENDIF//IF (Condition10 or Condition20) AND (Condition2 or Condition3 or Condition4 or Condition5 or Condition6 or Condition7 or Condition8 or Condition9 or Condition12 or Condition13 or Condition14 or Condition15 or Condition16 or Condition17 or Condition18 or Condition19) THEN// Magenta BarChartIF Churn <> 0 AND (ClimaxUp <> 0 OR ClimaxDown <> 0) THENClimaxChurn = ClimaxChurnValueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,0,255)ELSEClimaxChurn = 0ENDIF//StopVolume Orangered BarChartLocalClosingPosition = 1 - (High - Close) / (High - Low)IF Volume > Volume[1] AND Range < Range[1] AND ((High > High[1] AND LocalClosingPosition < 0.4) OR (Low < Low[1] AND LocalClosingPosition > 0.6)) THEN//StopVol = StopVolValue * 1 / 3 // HigherVolume & LowerRange @ HigherHigh or LowerLow - DBlueDRAWBARCHART(Open,High,Low,Close)COLOURED (255,69,0)ELSE//StopVol = 0ENDIF//Trampoline Blue BarChartFOR i = 1 TO 2 // Close togetherIF ((ClimaxChurn[i] > 0 OR ClimaxUp[i] > 0) AND (ClimaxChurn > 0 OR ClimaxUp > 0)) AND ((Close[i] > Open[i] AND Close < Open) OR (Close[i] < Open[i] AND Close > Open)) THEN//Trampoline = TrampolineValue * 1 / 4BREAKDRAWBARCHART(Open,High,Low,Close)COLOURED (0,0,255)ELSE//Trampoline = 0ENDIFNEXTENDIFRETURN01/08/2018 at 5:35 PM #57791 -
AuthorPosts
Find exclusive trading pro-tools on