I'd suggest you look at the AB library. I see a number of hits searching for Doji.
http://www.amibroker.com/library/list.php --- In amibroker@yahoogroups.com, "Sandeep Chadha" <schadh...@...> wrote: > > Hi everyone, > > > > I am absolutely new to Amibroker and to this forum and would like to know > the basic code for identifying a "going-long" Doji (or almost a Doji) and > then selling at 0.5% (parameterized and optimized later) profit > > > > Assumes that the length of the Doji has to be atleast .25% of the close) and > the body is very-very small. 0 body length is obviously preferential but > then it occurs very rarely. Buy at the opening of the bar that comes just > after the doji formation. > > > > Can someone help me correct this code - > > > > Thanks > > > > **************************************************************************** > *********************************************************************** > > Buy = Ref(H,-1)- Ref(L,-1)>(0.0025*Ref(C,-1)) AND abs (Ref(C,-1) - > Ref(O,-1))<(0.0005* Ref(C,-1)) AND Ref(H,-1) - Ref(C,-1)<(0.0005*Ref(C,-1)); > > BuyPrice = O; > > Sell = ???; > > SellPrice = BuyPrice*1.005; > > **************************************************************************** > *********************************************************************** >