Neha
Please try following...
If you do want previous day only, then use Ref(HHV(DH,3),-1)
I've removed if (true) because it is not needed.
If it was some part of your stub, retain it.
Idea is not to pollute the TF data and retain the timeframe array as pure as possible.
Please try following...
Code:
DH = TimeFrameGetPrice("H", inDaily);
DL = TimeFrameGetPrice("L", inDaily);
DC = TimeFrameGetPrice("C", inDaily);
TDPP = (HHV(DH,3) + LLV(DL,3) + Ref(DC,-1))/3;
I've removed if (true) because it is not needed.
If it was some part of your stub, retain it.
Idea is not to pollute the TF data and retain the timeframe array as pure as possible.
Last edited: