Coding for high and low between set hours
Forums › ProRealTime English forum › ProBuilder support › Coding for high and low between set hours
- This topic has 38 replies, 1 voice, and was last updated 3 years ago by Velociraptux.
-
-
05/21/2016 at 3:56 AM #759305/21/2016 at 4:17 AM #7594
Ok so now the close price is correct, but needs to move back to line up with High and low.
Getting closer. Like i’m playing with a rubic’s cube.
REM ESTABLISH MAX AND MIN EACH DAY OF WEEK
base = 360
periodo = 006000-horaanterior
n = abs(round(periodo/100))
x = abs(round(base/n))IF TIME=010000 THEN
horaanterior = Time[1]
endifIF DAYOFWEEK=1 THEN
MAXIMO = CashHighFr
MINIMO = CashLowFr
IF TIME = 160000 THEN
CashHighMo = Highest[x](high)
CashLowMo = Lowest[x](low)
CashCloseMo = Close
CashClose = CashCloseFr
ENDIF
ENDIFIF DAYOFWEEK=2 THEN
MAXIMO = CashHighMo
MINIMO = CashLowMo
IF TIME = 160000 THEN
CashHighTu = Highest[x](high)
CashLowTu = Lowest[x](low)
CashCloseTu = Close
CashClose = CashCloseMo
ENDIF
ENDIfIF DAYOFWEEK=3 THEN
MAXIMO = CashHighTu
MINIMO = CashLowTu
IF TIME = 160000 THEN
CashHighWe = Highest[x](high)
CashLowWe = Lowest[x](low)
CashCloseWe = Close
CashClose = CashCloseTu
ENDIF
ENDIFIF DAYOFWEEK=4 THEN
MAXIMO = CashHighWe
MINIMO = CashLowWe
IF TIME = 160000 THEN
CashHighTh = Highest[x](high)
CashLowTh = Lowest[x](low)
CashCloseTh = Close
CashClose = CashCloseWe
ENDIF
ENDIFIF DAYOFWEEK=5 THEN
MAXIMO = CashHighTh
MINIMO = CashLowTh
IF TIME = 160000 THEN
CashHighFr = Highest[x](high)
CashLowFr = Lowest[x](low)
CashCloseFr = Close
CashClose = CashCloseTh
ENDIF
ENDIFreturn MAXIMO AS “LAST DAY MAX”,MINIMO AS “LAST DAY LOW”,CashClose as “Cash Close”
05/21/2016 at 4:26 AM #759505/21/2016 at 5:01 AM #7596Bingo………….. ASX 4Pm close GMT +10
REM ESTABLISH MAX AND MIN EACH DAY OF WEEK
base = 360
periodo = 006000-horaanterior
n = abs(round(periodo/100))
x = abs(round(base/n))IF TIME=010000 THEN
horaanterior = Time[1]
endifIF DAYOFWEEK=1 THEN
MAXIMO = MyHigh
MINIMO = MyLow
IF TIME = 160000 THEN
MyHigh = Highest[x](high)
MyLow = Lowest[x](low)
Myclose = close
ENDIF
ENDIFIF DAYOFWEEK=2 THEN
MAXIMO = MyHigh
MINIMO = MyLow
IF TIME = 160000 THEN
MyHigh = Highest[x](high)
MyLow = Lowest[x](low)
Myclose = close
ENDIF
ENDIfIF DAYOFWEEK=3 THEN
MAXIMO = MyHigh
MINIMO = MyLow
IF TIME = 160000 THEN
MyHigh = Highest[x](high)
MyLow = Lowest[x](low)
Myclose = close
ENDIF
ENDIFIF DAYOFWEEK=4 THEN
MAXIMO = MyHigh
MINIMO = MyLow
IF TIME = 160000 THEN
MyHigh = Highest[x](high)
MyLow = Lowest[x](low)
Myclose = close
ENDIF
ENDIFIF DAYOFWEEK=5 THEN
MAXIMO = MyHigh
MINIMO = MyLow
IF TIME = 160000 THEN
MyHigh = Highest[x](high)
MyLow = Lowest[x](low)
Myclose = close
ENDIF
ENDIFreturn MAXIMO AS “LAST DAY MAX”,MINIMO AS “LAST DAY LOW”,MyClose as “Cash Clo
05/21/2016 at 5:02 AM #759705/21/2016 at 8:35 AM #760005/21/2016 at 9:09 AM #761101/29/2017 at 7:24 PM #22976Hello,
I would need to know only the maximum and the minimum of one day in a range of times eg 15:30 cet cet 2150 regardless of the Time Frame used. I tried to change these indicators but can not get anything. You can help me ? Thanks
05/10/2021 at 12:03 AM #169213Multi time-frames and lighter version.
12345678910111213141516171819once x = 0StartTime = 080000EndTime = 230000IF DAYOFWEEK <= 5 AND TIME >= StartTime AND TIME <= EndTime THENx = x + 1MaxLastDay = CashHighMinLastDay = CashLowIF TIME = EndTime THENDayClose = closeCashHigh = Highest[x](high)CashLow = Lowest[x](low)x = 0ENDIFENDIfreturn MaxLastDay AS "LAST DAY MAX",MinLastDay AS "LAST DAY LOW",DayClose as "Cash Close" -
AuthorPosts
Find exclusive trading pro-tools on