At present I am using the following code for 1st Hour High Low marker.
_SECTION_BEGIN("Ist Hr. High-Low Marker");
SetChartOptions(0,chartShowArrows|chartShowDates);
SetChartBkColor(ParamColor("Outer panel",colorBlack));
SetChartBkGradientFill(
ParamColor("Inner panel upper",colorBlack),
ParamColor("Inner panel lower",colorBlack));
TM=Param("Time",101500,110000,235500,1);
afterbreakout0 = Cross(TimeNum(),TM);
afterbreakout1 = TimeNum()>=TM;
NewDay = Day()!= Ref(Day(), -1);
highestoftheday = HighestSince(newday,H,1);
Lowestoftheday =LowestSince(newday,L,1);
ORBHigh = ValueWhen(afterbreakout0,highestoftheday,1);
ORBLow = ValueWhen(afterbreakout0,lowestoftheday,1);
Plot(C,"",colorWhite,styleCandle);
Plot(NewDay,"",colorWhite,styleHistogram|styleOwnScale);
Plot(afterbreakout0,"",colorBlue,styleHistogram|styleOwnScale);
Plot(ORBHigh,"",colorLime,styleDots);
Plot(ORBLow,"",colorRed,styleDots);
_SECTION_END();
I want to modify this code for drawing one horizontal line as follows:
- check two closing price ( P1) at 12.00 and second (P2) price at 12.15.
- If P2 > P1 and open of P2 >= close of P1 then horizontal line at close of P2
else
If P1 > P2 and close of P1 >= open of P2 then horizontal line at open of P1
else
if open of P1 = close of p2 then horizontal line at open of p1
else
if open of P2 = close of p1 then horizontal line at open of p1
Experts please guide.