Professional Documents
Culture Documents
PRT Codes
PRT Codes
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
------------------------------------------------------------------------
////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
----------------------------------------------------------------