Exploration on previous day close

_SECTION_BEGIN("3DaysTricks");
/* 
	**********To be scanned after 9:30AM******
	
	 		If by first 15mnts of opening u find these 2 criteria then BOOOOOOM BOOOOOOM 

		IF CMP 1% ABOVE PREVIOUS DAYS CLOSE and ALSO  IF TODAY'S VOLUME 5% ABOVE  PREVIOUS DAYS VOLUME 
		THEN BOOM BUY
		
		&
		
		IF CMP 1% BELOW PREVIOUS DAYS CLOSE and ALSO 	IF TODAY'S VOLUME 5% ABOVE  PREVIOUS DAYS VOLUME THAN BOOM SELL
	
	
*/
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
PrevClose = TimeFrameGetPrice( "C", inDaily, -1 );
PrevVolume = Ref( V, -1 );

DOpen = TimeFrameGetPrice( "O", inDaily, 0 ); // gives you Todays Open price. 
DLow = TimeFrameGetPrice( "L", inDaily, 0 ); // gives you Todays Low price. 
DHigh = TimeFrameGetPrice( "H", inDaily, 0 ); // gives you Todays Low price. 
DLow = TimeFrameGetPrice( "L", inDaily, 0 ); // gives you Todays Low price. 
LTP = BuyPrice  ; 
OnePercentAbv = PrevClose+(PrevClose*0.01);
OnePercentBlw = PrevClose-(PrevClose*0.01);
FivePercVolume = PrevVolume + (PrevVolume*0.05);

Buy =  LTP > OnePercentAbv AND Volume > FivePercVolume; //CMP 1% ABOVE PREVIOUS DAYS CLOSE & TODAY'S VOLUME 5% ABOVE  PREVIOUS DAYS VOLUME

Sell =  LTP < OnePercentBlw AND Volume > FivePercVolume; //CMP 1% BELOW PREVIOUS DAYS CLOSE & TODAY'S VOLUME 5% ABOVE  PREVIOUS DAYS VOLUME


//SL = (DOpen+DLow)/2;


Filter = Buy OR Sell;

AddColumn( IIf( Buy, 66,83 ), "Signal", formatChar, 1, bkcolor =IIf (Buy,colorGreen, colorred ));
AddColumn(PrevClose,"Prev Close",1.2,colorBlack,colorLightGrey);
AddColumn(DOpen,"Open",1.2,colorBlack,colorLightGrey);
AddColumn(OnePercentAbv,"Buy Above This",1.2,colorWhite,colorGreen);
AddColumn(DHigh,"High",1.2,colorWhite,colorGreen);
AddColumn(OnePercentBlw,"Sell Below This",1.2,colorBlack,colorLightOrange);
AddColumn(DLow,"Low",1.2,colorBlack,colorLightOrange);

AddColumn(LTP,"LastTradePrice",1.2,colorBlack,colorLightGrey);
AddColumn(Volume,"Today Volume",1.2,colorBlack,colorPink);
AddColumn(PrevVolume,"Prev Volume",1.2,colorBlack,colorPink);
AddColumn(ROC(V,1),"% Vol change",1.2,colorBlack,colorPink);

SetSortColumns (-13);


_SECTION_END();
	![2018-11-08_13h32_26|690x304](upload://nwFwwm6J0phvLTfhCMjakRv9OAD.jpeg) 
```![2018-11-08_13h32_26|690x304](upload://nwFwwm6J0phvLTfhCMjakRv9OAD.jpeg)
PrevVolume = Ref( V, -1 );

This line is inconsistent with the definition provided and does not guarantee daily volume.
Nor is it inline with the other OHLC values beyond retrieved.

It will result in the exploration generating false signals.

2 Likes