hi,

code below will trigger a buy signal in real time once the price crosses the 
highest value of the previous 20 bars, rgds, Ed


hhv20 = Ref(HHV(H,20),-1); 
Buy = Cross(H,hhv20); BuyPrice = Max(O,hhv20); 

SetChartOptions(0, chartShowDates); 
Plot(C,"Last",colorWhite,64); 
Plot(hhv20,"hhv20",colorYellow,styleThick | styleDashed); 

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,-15); 
PlotShapes(IIf(Buy,shapeHollowUpArrow,shapeNone),colorWhite,0,L,-15); 
PlotShapes(IIf(Buy,shapeHollowSmallCircle,shapeNone),colorWhite,0,BuyPrice,0); 


 


  ----- Original Message ----- 
  From: zeek ing 
  To: [email protected] 
  Sent: Tuesday, March 31, 2009 5:04 PM
  Subject: [amibroker] price not close question



  I have a trading system that I want to buy when price crosses above 20 bar 
high. I know how to write if high or close crosses. but i want to know if price 
crosses above even if not high or close, just the current price. How would I 
code that?

  thanks in advance . 

  zeek

  

Reply via email to