♥ 0 |
Hi.. I have a great simple study to plot the HLC from the previous day (for intraday chart on current day) that I found here but would like it to plot only on the current day? (input showonlytoday = yes).. I believe I need some NaN values but can’t seem to get the sequence and I’m not that well acquainted with these functions, this is my main issue, I’d also like to show an optional label on the actual line (like YC, YL, YH) or similar.. Thanks so much this code is simple and great but was just looking for a couple of added functions.. plot previousDayHigh = high(period = AggregationPeriod.DAY)[1]; plot previousDayLow = low(period = AggregationPeriod.DAY)[1]; plot previousdayclose = close(period = aggregationPeriod.DAY)[1];
Marked as spam
|
Private answer
I think it's important to note there is a typo in your original title which I tried to correct. You listed this as OHL when in fact the code you provided includes only the HLC. And let's make sure that everyone understand this is a pretty common request and has already been posted in a variety of forms throughout this forum. Many examples will define a specific period with a start time and end time. But others will show only for current day like the example below: https://www.hahn-tech.com/ans/pre-market-hl-previous-days-hlc/ The following is a previous post that is nearly a perfect match for what you have requested: https://www.hahn-tech.com/ans/plot-previous-hlc-without-extended-hours-on/ The key to this technique is creating a boolean variable statement which is used to "filter" the plot statements. I often name this variable "okToPlot" as follows:
Now let's take the code you have provided and add this filter to it:
Marked as spam
|
Please log in to post questions.