MertParticipant
Average
Hello,
I am unable to code myself and was helped very well yesterday. I have another issue that I need some help with.
I am looking for a code that draws in a 1 minute chart the median priceline of the previous hourly candle. If anyone can help me with that it will be fantastic.
Thank as lot in advance and with regards,
Andre
Previous hour means fixed hours (9-10, 10-11, 11-12,….) or just the 60 previous bars of any given minute?
MertParticipant
Average
Hello Roberto,
It means fixed hour. Actually I can have it drawn with the standard price line. If I do that, I cannot code an indicator in a 1 minute chart for example: 1 minute close higher than previous hour mid point. That is what I am after.
If not clear do please let me know.
Thanks in advance,
Andre
This should do, if you apply it on the price chart it will report what you need:
defparam calculateonlastbars = 200
MinuteBars = OpenMinute + 1
hh = highest[60](high[MinuteBars])
ll = lowest[60](low[MinuteBars])
RETURN (hh + ll) / 2
Added as Row 62 to here Snippet Link Library
MertParticipant
Average
Did looks good. Thanks so far. Highly appreciated.