CANDELSTICK STOCHASTIC FIBO
Forums › ProRealTime forum Français › Support ProBuilder › CANDELSTICK STOCHASTIC FIBO
- This topic has 3 replies, 2 voices, and was last updated 4 days ago by
robertogozzi.
-
-
08/12/2025 at 3:45 PM #249672
Bonjour à tous,
Serait-il possible de mettre une valeur sur le dernier chandelier afin de pouvoir déclencher mes alertes
//PRC_CandlesticksStochastic | indicator
//25.10.2016
//Nicolas @ http://www.prorealcode.com
//Sharing ProRealTime knowledgeperiod = 7
////////////////////////////////////////////////////////////////////
//lastest highhest high and lowest low over “period”
hh = highest[period](high)
ll = lowest[period](low)
scale = hh-ll
dynO = ((Open-ll)/scale)*100
dynH = ((High-ll)/scale)*100
dynL = ((Low-ll)/scale)*100
dynC = ((Close-ll)/scale)*100
//candle color
if Open>Close then
r = 0
g = 102
else
r = 102
g = 0
endif
//draw candlesticks
DRAWCANDLE(dynO,dynH,dynL,dynC) coloured(g,r,0) bordercolor (g,r,0)return 0 as ” 0 ” ,23.6 as “23.6 % level”,38.2 as ” 38.2 “, 50 as “50% level”, 61.8 as ” 61.8 ” ,78.6 as “78.6% level”, 100 as ” 100 ”
// Variables :
// period = 2608/12/2025 at 3:56 PM #249674J’ai ajouté la ligne 26 (mySignal = 0), où vous pouvez saisir la valeur ou l’expression de votre choix.
Les données ou le résultat seront renvoyés comme première valeur de la ligne 27 (RETURN) :123456789101112131415161718192021222324252627282930//PRC_CandlesticksStochastic | indicator//25.10.2016//Nicolas @ http://www.prorealcode.com//Sharing ProRealTime knowledgeperiod = 7//////////////////////////////////////////////////////////////////////lastest highhest high and lowest low over "period"hh = highest[period](high)ll = lowest[period](low)scale = hh-lldynO = ((Open-ll)/scale)*100dynH = ((High-ll)/scale)*100dynL = ((Low-ll)/scale)*100dynC = ((Close-ll)/scale)*100//candle colorif Open>Close thenr = 0g = 102elser = 102g = 0endif//draw candlesticksDRAWCANDLE(dynO,dynH,dynL,dynC) coloured(g,r,0) bordercolor (g,r,0)mySignal = 0 //you can set any value of your choice herereturn mySignal AS "Signal",0 as " 0 " ,23.6 as "23.6 % level",38.2 as " 38.2 ", 50 as "50% level", 61.8 as " 61.8 " ,78.6 as "78.6% level", 100 as " 100 "// Variables :// period = 2608/13/2025 at 9:59 AM #249693merci Roberto, mais je n’ai pas de valeur qui s’affiche sur le dernier chandelier. J’aimerai pouvoir ajouter une ligne dynamique horizontale.
08/13/2025 at 3:47 PM #249698Voilà:
123456789101112131415161718192021222324252627282930313233343536//PRC_CandlesticksStochastic | indicator//25.10.2016//Nicolas @ http://www.prorealcode.com//Sharing ProRealTime knowledgeDEFPARAM DrawOnLastBarOnly = Trueperiod = 7//////////////////////////////////////////////////////////////////////lastest highhest high and lowest low over "period"hh = highest[period](high)ll = lowest[period](low)scale = hh-lldynO = ((Open-ll)/scale)*100dynH = ((High-ll)/scale)*100dynL = ((Low-ll)/scale)*100dynC = ((Close-ll)/scale)*100//candle colorif Open>Close thenr = 0g = 102elser = 102g = 0endif//draw candlesticksDRAWCANDLE(dynO,dynH,dynL,dynC) coloured(g,r,0) bordercolor (g,r,0)mySignal = (abs(close - close[1])>= (range+range[1]))//0 //you can set any value of your choice hereIF mySignal <= 0 THENmySignal = mySignal[1]ELSEOffset = highmyBar = BarIndexENDIFIF mySignal > 0 THENDrawSegment(myBar,Offset,BarIndex+20,Offset) style(line,2) coloured("Cyan")ENDIFreturn mySignal AS "Signal",0 as " 0 " ,23.6 as "23.6 % level",38.2 as " 38.2 ", 50 as "50% level", 61.8 as " 61.8 " ,78.6 as "78.6% level", 100 as " 100 "À la ligne 26, vous devrez définir votre condition pour que le segment apparaisse sur le dernièr chandelier (celle où le signal s’est produit).
Si vous souhaitez qu’il commence sur le dernièr chandelier, remplacez la ligne 34 par ceci :1DrawSegment(barIndex,Offset,BarIndex+20,Offset) style(line,2) coloured("Cyan") -
AuthorPosts