Hello,
I am having problems with using daily pivot points intraday. I am trying to buy when
- pivot point today is higher than pivot point yesterday AND
- candle's low (on 1 minute time frame) is below pivot point.
I can get individual buys when using either of the rules, but not with both rules. The only exception is when the first candle of the day is below pivot point for that day.
Can someone tell me what am I doing wrong? Exploration results seem correct.
_N(Title = StrFormat(FullName() + " {{INTERVAL}} {{DATE}} Open %g, High %g, Low %g, Close %g (%.1f%%) Volume " +WriteVal( V, 1.0 ) +"\n{{VALUES}}", O, H, L, C,
SelectedValue( ROC( C, 1 )) ));
PriceStyle = GetPriceStyle();
PriceStyleOpt = ParamStyle("Style") | PriceStyle;
// PIVOT POINTS
// Get prev day high, low, close
dh = TimeFrameGetPrice("H", inDaily, -1);
dl = TimeFrameGetPrice("L", inDaily, -1);
dc = TimeFrameGetPrice("C", inDaily, -1);
P = (dh + dl + dc)/3; //Pivot
R2 = P + (dh-dl); //Resistance 2
R1 = (P*2) - dl; // Resistance 1
S1 = (P*2) - dh; //Support 1
S2 = P - (dh-dl);//Support 2
// Contact with P0
bullish = IIf(P > Ref(P, -1), True, False);
contact = P > L;
Buy = bullish AND contact; //Buy Condition
Sell = TimeNum() > 155500; //Sell Condition
Buy = ExRem(Buy,Sell); //Removing Excessive Buy Signals At each bars
Sell = ExRem(Sell,Buy); //Removing Excessive Sell Signals at each bars
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGold, colorRed ), 0, IIf( Buy, Low, High ) );
Plot( C, "", colorBlack,styleCandle);
SetChartOptions( 0, chartShowDates );
Plot(P, "P0", colorAqua);
Filter = 1;
AddColumn(L, "Low");
AddColumn(P, "Daily Pivot");
AddColumn(P > L, "Contact");
I also tried using TimeFrameSet and Restore, and got the same exploration results.