Also you also don't need the EMA test
inside your shape = statement since it's already in your Buy and Sell
conditions. Keiths ExRem should fix your multiple arrow problem. Try this simplified
version:
PlotShapes(Buy * shapeUpArrow + Sell * shapeDownArrow,
IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
-----Original
Message-----
From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Keith McCombs
Sent: Monday, May 08, 2006 11:36
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Set
Arrows
// after buy and
sell equations, and before you shape =
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
sai20_2000 wrote:
I am trying to set following buy and sell condition
Buy=IIf(EMA(C,3)> EMA(C,20) ,Ref(AStochRSI,1)>Ref(ASTochRSI,-1)AND
AstochRSI>50,IIf(AstochRSI >65,Cross( EMA(C,3), EMA(C,20)),Null));
Sell=IIf(EMA(C,3)< EMA(C,20) ,Ref(AStochRSI,1)<Ref(ASTochRSI,-1) AND
AStochRSI<50,IIf(AstochRSI <40,Cross(EMA(C,20), EMA(C,3)),Null));
shape=IIf((EMA(C,3)>EMA(C,20)) ,Buy * shapeUpArrow ,Sell *
shapeDownArrow);
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy,
Low, High ) );
where Astochrsi is for period 20
Here I want to put for eg.buy arrow on chart when EMA(C,3)> EMA
(C,20) and very 1st occurance of greater value of AstochRSI than the
previous when the above condition is met,but arrows are placed on
the every subsequent occrance of rising AstochRSI. How can I limit
the arrow to the very 1st occurance only. Any help is appreciated
Regards
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS