Bonjour, Lorsque j’affiche les points pivots ou les DOpen(1), DHigh(1) ,Dlow(1) ou Dclose(1),
le graphique fait démarrer ces lignes à 6h00.
Je voudrais avoir 00h00 heure comme origine ce qui m’épargernait de tout reprogrammer.
Y a-t-il un moyen de changer cette origine ?
Merci d’avance
D’abord, merci de votre réponse qui marche très bien.
Mais mon objet était de calculer les points pivots ; ce qu’il me faut,
ce n’est pas les données du jour, mais de la veille.
Est-il possible de coder cela ?
Merci encore
voici:
once todayOpen=open
once todayHigh=high
once todayLow=low
once todayClose=close
once Dailyclose=todayClose
once DailyOpen=todayopen
once DailyHigh=todayHigh
once DailyLow=todayLow
checkTime=010000
if opentime>=checktime and opentime[1]<checktime then
Dailyclose=todayClose
DailyOpen=todayopen
DailyHigh=todayHigh
DailyLow=todayLow
//-------------------------------
//Pivot points
Pivot=(DailyHigh + DailyLow + Dailyclose) / 3
R01 = 2*Pivot - DailyLow
S01 = 2*Pivot - DailyHigh
R02 = Pivot + (DailyHigh - DailyLow)
S02 = Pivot - (DailyHigh - DailyLow)
R03 = R01 + (DailyHigh - DailyLow)
S03 = S01 - (DailyHigh - DailyLow)
//-------------------------------
todayOpen=open
todayHigh=high
todayLow=low
todayClose=close
else
todayHigh=max(high,todayHigh)
todayLow=min(low,todayLow)
todayClose=close
endif
if islastbarupdate then
drawsegment(barindex,Pivot,barindex+10,Pivot)coloured("blue")
drawsegment(barindex,R01,barindex+10,R01)coloured("red")
drawsegment(barindex,R02,barindex+10,R02)coloured("red")
drawsegment(barindex,R03,barindex+10,R03)coloured("red")
drawsegment(barindex,S01,barindex+10,S01)coloured("green")
drawsegment(barindex,S02,barindex+10,S02)coloured("green")
drawsegment(barindex,S03,barindex+10,S03)coloured("green")
endif
return