AntMan
New member
I am having difficulty getting the "ShowOnlyToday" & "ShowOnlyLastPeriod" functions to work.. simply put, when I set it to "Yes", the indicator ignores the command and still displays on all the prior days.. I only want the study to display on only the current day and/or only the prior day, depending on the application.. below is the code.. this example has the "ShowOnlyToday" command in it, however if help could be provided for both "ShowOnlyToday" & "ShowOnlyLastPeriod" commands, it would be greatly appreciated, as I am having the issue with both commands..
Thanks in advance!
Code:
declare hide_on_daily;
input time = 0930;
input price = open;
input showOnlyToday = yes;
rec time_value = If(SecondsTillTime(time) == 0, price, time_value[1]);
plot open = If(time_value == 0, Double.NaN, time_value);
open.SetDefaultColor(Color.WHITE);
open.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
open.setStyle(curve.SHORT_DASH);
open.SetLineWeight(2);
Thanks in advance!