I have been trying to adapt the "getPrevOHLC.efs" forumla, which is found in the "OHLC" formula folder. I want it to show the Weekly High/Low.
Problem #1: The formula seems to work fine as long as I use the time template for "Equity RTH - West Coast." However, if I use the time template for "24 Hour," I get a value for two days/weeks previous to the current day, rather than one day/week previous to the current day. I trade index futures (ES, NQ) and like to look at the night session too (24 Hour), so this is a problem. Does anybody know how to fix the formula to get the correct result (previous day/week high/low using the 24 Hour time template)?
Problem #2: In trying to figure out the logic of the formula, I have run across several undocumented commands. Can anybody explain the following:
Line 34: getBarState()
Line 35: BARSTATE_ALLBARS
Line 56: "rawtime"
Line 60: RawTime.DAY
A line by line English language translation of the whole forumla would be ideal, but I would settle for an explanation of the above undocumented commands. Can anybody lend a hand?
Problem #1: The formula seems to work fine as long as I use the time template for "Equity RTH - West Coast." However, if I use the time template for "24 Hour," I get a value for two days/weeks previous to the current day, rather than one day/week previous to the current day. I trade index futures (ES, NQ) and like to look at the night session too (24 Hour), so this is a problem. Does anybody know how to fix the formula to get the correct result (previous day/week high/low using the 24 Hour time template)?
Problem #2: In trying to figure out the logic of the formula, I have run across several undocumented commands. Can anybody explain the following:
Line 34: getBarState()
Line 35: BARSTATE_ALLBARS
Line 56: "rawtime"
Line 60: RawTime.DAY
A line by line English language translation of the whole forumla would be ideal, but I would settle for an explanation of the above undocumented commands. Can anybody lend a hand?
Comment