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 -----
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
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|