Bonsoir
Peut-être que ce code répond à ta requête.
Malheurement ce la ne fontionne que sur les Cryptos/Devises. Je flanche totalement pour trouver la solution complète.
Je fais un appel à l’aide aux Codeurs_Pros pour coder une version qui fonctionne sur des instruments intégrant le volume.
Merci par avance
Bien à vous
defparam DRAWONLASTBARONLY=True
defparam calculateonlastbars=1024
MyStoch =Stochastic[14,3](close)
Rem ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Rem Decomptage : Crypto et Devises ( car no volume)
Rem ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
TimeframeSelect=GetTimeframe
if TimeframeSelect=-1 or TimeframeSelect[1]=-1 and Volume[1]=Volume[2] then rem condition UT Tick
rem ▄ TF : TICK SANS volume
comptage = volume
comptageMax = highest[2]( comptage)
decompte = comptageMax - comptage
DRAWTEXT(" ONLY Crypto / Forex", barindex, 100, dialog,standard,14) COLOURED(106,106,106,255)
DRAWTEXT(" #comptageMax#Tick.", barindex , 15, dialog,standard,16) COLOURED(106,106,106,255)
DRAWTEXT(" #decompte#", barindex, 55, dialog,standard,40) COLOURED(106,106,106,255)
DRAWTEXT(" #comptageMax#Tick.", barindex , 15, dialog,standard,16) COLOURED(106,106,106,255)
else
rem ▄ TF : Secondes
rem Alerttime=25 //Alert me x seconds before closing
TimeframeSelect=GetTimeframe
duration = timestamp-opentimestamp
durationMax=duration[1]
remainingtimeinsec=( TimeframeSelect-duration)
//if not(duration[1]=0 and duration[2]=0) and not TimeframeSelect=-1 then
if TimeframeSelect >-1 then
//if TimeframeSelect=-1 then
DRAWTEXT(" ONLY Crypto / Forex", barindex, 100, dialog,standard,14) COLOURED(106,106,106,255)
DRAWTEXT(" #remainingtimeinsec#", barindex, 55, dialog,standard,40) COLOURED(106,106,106,255)
DRAWTEXT(" #durationMax#Sec", barindex, 15, dialog,standard,20) COLOURED(106,106,106,255)
endif
endif
return MyStoch as "MyStoch", 100 as "100", 0 as "0"