Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

once MonthlyHigh=undefined

once MonthlyLow=undefined
DailyHigh= DHigh(0)
DailyLow= DLow(0)

// monthly high/low
If Month <> Month[1] then
//If Month = currentmonth then
MonthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
MonthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
lastMonthBarIndex = BarIndex
ENDIF

//DRAWRECTANGLE(x,y,z,z)

return MonthlyHigh as "Prev Month High", MonthlyLow as "Prev Month Low"

XJO Monthly Range Box

maxvalue = max(maxvalue , high)


minvalue = min(minvalue , low)

if month <> month[1] then


DRAWRECTANGLE(x1,maxvalue,barindex-1,minvalue) coloured(0,0,0,77)
x1=barindex
maxvalue=high
minvalue=low
endif

RETURN max(maxvalue , high) as "high", min(minvalue , low) as "low"

XJO Weekly Range Box

maxvalue = max(maxvalue , high)


minvalue = min(minvalue , low)

if opendayofweek < opendayofweek[1] then


DRAWRECTANGLE(x1,maxvalue,barindex-1,minvalue) coloured(0,0,0,77)
x1=barindex
maxvalue=high
minvalue=low
endif

RETURN

------------------------------------------------------------------------

////ONCE DAY////
once currenthighday=high
once currentlowday=low
once previoushighday=undefined
once previouslowday=undefined
////ONCE WEEK////
once currenthighweek=high
once currentlowweek=low
once previoushighweek=undefined
once previouslowweek=undefined

////ONCE MONTH////
once currenthighmonth=high
once currentlowmonth=low
once previoushighmonth=undefined
once previouslowmonth=undefined

////ONCE TRIMESTRIAL////
trimH=max(trimH,high)
trimL=min(trimL,low)

////ONCE ANNUEL////
once currenthighannuel=high
once currentlowannuel=low
once previoushighannuel=undefined
once previouslowannuel=undefined

////OPEN DAY////
if openday <> openday[1] then
previoushighday=currenthighday
previouslowday=currentlowday
currenthighday=high
currentlowday=low
else
currenthighday=max(high,currenthighday)
currentlowday=min(low,currentlowday)
endif

////OPEN WEEK////
if DayOfWeek<DayOfWeek[1] then
previoushighweek=currenthighweek
previouslowweek=currentlowweek
currenthighweek=high
currentlowweek=low
else
currenthighweek=max(high,currenthighweek)
currentlowweek=min(low,currentlowweek)
endif

////OPEN MONTH////
if openmonth<>openmonth[1]then
previoushighmonth=currenthighmonth
previouslowmonth=currentlowmonth
currenthighmonth=high
currentlowmonth=low
else
currenthighmonth=max(high,currenthighmonth)
currentlowmonth=min(low,currentlowmonth)
endif

////OPEN TRIMESTRIAL////
If openMonth<>openMonth[1] then
if openmonth=4 or openmonth=7 or openmonth=10 or openmonth=1 then
trimestrialH=trimH
trimestrialL=trimL
trimL=close*100
trimH=0
endif

endif

////OPEN ANNUEL////
if openyear <> openyear[1] then
previoushighannuel=currenthighannuel
previouslowannuel=currentlowannuel
currenthighannuel=high
currentlowannuel=low
else
currenthighannuel=max(high,currenthighannuel)
currentlowannuel=min(low,currentlowannuel)
endif

return previoushighday coloured(46, 134, 193) as "Précédent haut journalier",


previouslowday coloured(46, 134, 193) as "Précédent bas journalier",
previoushighweek coloured(0,0,0) as "Précédent haut semaine", previouslowweek
coloured(0,0,0) as "Précédent bas semaine", previoushighmonth coloured(250, 47, 47)
as "Précédent haut mensuel", previouslowmonth coloured(250, 47, 47) as "Précédent
bas mensuel", trimestrialH coloured(255, 195, 0) as "Précédent haut trimestriel",
trimestrialL coloured(255, 195, 0) as "Précédent bas trimestriel",
previoushighannuel coloured(176, 0, 165) as "Précédent haut annuelle",
previouslowannuel coloured(176, 0, 165) as "Précédent bas annuelle"

----------------------------------------------------------------

You might also like