At 9:25-9:30, Want to Scan stocks below prev. Day low/above prev. Day high. Code for the same?

Buy Signal: If Stock goes above previous day’s High.

Sell Signal: If Stock goes below previous day’s Low.

How can I Generate above signals using scanner in Pi when the market opens.

Need the Code for scanning the Nifty 50 Stocks as per the above conditions.

Thanks

The above conditions can be simply coded into Amibroker and you can use that to generate buy or sell signals.

Please find the afl code which checks if current intraday candle closes above or below yesterday's high or low between 9.25-9.30am

//----------------------------------------------------------------------------------------------------
//
//  Formula Name:    Prev-day High/Low Break trade
//  Author/Uploader: Neotrade Analytics Pvt Ltd 
//  E-mail:          [email protected]
//  Website          www.neotradeanalytics.com
//  Algobase        algobase.neotradeanalytics.com
//
//This is an attempt to provide a basic trading system AFL. The system is purely imaginary
//AND NOT provided as one that would make money. This is just to provide a guide to learners
//on the common components of writing AFL.
//
//-------------------------Summary of AFL-------------------------------------------------------------
//This AFL produces results Buy/Sell results when current intraday candle closes above or below
//previous day high/low
//----------------------------------------------------------------------------------------------------
	
_SECTION_BEGIN("Previous day high check"); 
SetChartBkColor(ParamColor("Outer panel color ",colorLightGrey)); // color of outer border 
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +"{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", colorBlack, styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

Session= TimeNum() >= 092500 AND TimeNum() <= 093000;

prevdayhigh[0] = 0;
prevdaylow[0] = 0;

prevdayhigh = TimeFrameGetPrice( "H", inDaily, -1 );
prevdaylow = TimeFrameGetPrice( "L", inDaily, -1 );

Buy = iif((close>prevdayhigh)&&Session,1,0);
Sell = iif((close < prevdaylow)&&Session,1,0);

//Buy = ExRem(Buy,Sell);
//Sell = ExRem(Sell,Buy);

PlotShapes(IIf(Buy, shapestar, shapeNone),colorGreen,0,L,Offset=-45 );
PlotShapes(IIf(Sell, shapestar, shapeNone),colorRed,0,H,Offset=-45);
_SECTION_END();

Warm Regards,

Vivith Kumar ML

www.neotradeanalytics.com

(Authorized realtime data vendor of NSE and BSE provides realtime datafeeds to Amibroker,Metastock,Ninjatrader,custom programming languages(C,C++,Perl,Java) , API for commercial applications and support auto-trading bridge to Zerodha Pi platform)

i think he is asking about time also? is it possible to consider time frame in amibroker? Let me is there any free version of amibroker.

yes, time frame can be considered

HI,

This code is excellent, can you do AFL code, to buy when price crosses opening price in intraday from below,
and sell when price crosses opening price in intraday from top.