defparam calculateonlastbars = 100
defparam drawonlastbaronly = true
iATR=average[20](tr)
IF TFJour THEN
P1=200
P2=125
P3=50
P4=20
p5=13
elsif TFSemaine then
P1=40
P2=25
P3=10
P4=4
p5=52
endif
//Long terme:
//PPO
F1LT = 100*(close - exponentialaverage[p1](close))/exponentialaverage[p1](close)
//ROC
F2LT=ROC[p2](close)
//Resulat LT
NoteLT=(F1LT+F2LT)*0.6
//Moyen terme:
//PPO
F1MT = 100*(close - exponentialaverage[p3](close))/exponentialaverage[p3](close)
//ROC
F2MT=ROC[p4](close)
//Resulat MT
NoteMT=(F1MT+F2MT)*0.3
//court terme:
//PPO
SlowAvgCT = exponentialAverage[26](close)
FastAvgCT = exponentialAverage[12](close)
DifferenceCT = (FastAvgCT - SlowAvgCT)
macdPPO=exponentialAverage[9](DifferenceCT)
PENTEmacdPPO=(macdPPO-macdPPO[3])/3
if PENTEmacdPPO>1 then
F1CT=100*0.05
elsif PENTEmacdPPO<-1 then
F1CT=-100*0.05
else
F1CT=(PENTEmacdPPO+1)*50*0.05
endif
//RSI
RSIct=Rsi[14](close)
if RSIct>50 then
F2CT=100*0.05
elsif RSIct<=50 then
F2CT=-100*0.05
endif
//Resulat CT
NoteCT=(F1CT+F2CT)
// Rapport
RPP = NoteLT+NoteMT+NoteCT
XR = round (RPP)
// Evolution du rapport dans le temps
EvolXR=round(100*(XR-XR[p5])/XR[p5])
if xr > 0 then
drawtext("Note:#XR# ,GL depuis 3 mois:#EvolXR#% ",barindex+decalagetexte,low-iatr*2,Dialog,Bold,14) coloured(0,102,255)
elsif xr =< 0 then
drawtext("Note:#XR# ,GL depuis 3 mois:#EvolXR#% ",barindex+decalagetexte,low-iatr*2,Dialog,Bold,14) coloured(204,0,0)
endif
return