I need to plot a horizontal line (on every timeframe’s chart) showing the Daily High and Low for the last trading day (of course it has some meaning only on lower timeframes than the Daily).
Nicolas, it works everyday but on monday, since on monday it refers to weekend data.
I arranged this code to account for mondays, unless someone WANTS to refer to we data, in that case your code is fine (or my code won’t need the OpenDayOfWeek test).
1
2
3
4
5
6
7
8
9
10
11
12
13
DEFPARAMDrawOnLastBarOnly=True
IFOpenDayOfWeek=1THEN//one more day to look back on Monday
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue