Can you please hep me code Previous Day Close, Mid ,Low , High on Intraday Candle on Price. I can code it on the Daily Candle but cant get it to work on Intraday Chart.
Attach is the code I am using
Thanks
DefParam DrawOnLastBarOnly = true
a1=High
a2=Low
a3=Close
Daymid= (a1+a2)/2
return Daymid as “Daymid”, a3 as “DayClose”, a1 as “DayHigh”, a2 as “DayLow”
This is your code, slightly modify to achieve what you want:
DefParam DrawOnLastBarOnly = true
Timeframe(Daily,UpdateOnClose)
a1=High
a2=Low
a3=Close
Daymid= (a1+a2)/2
Timeframe(default)
return Daymid as “Daymid”, a3 as “DayClose”, a1 as “DayHigh”, a2 as “DayLow”
DefParam DrawOnLastBarOnly = true will make no difference, as it is only used for objects plotted using graphical instructions (DRAW…..), not with RETURNed data.