PureBytes Links
Trading Reference Links
|
Try something like this...
Mike
MA50 = MA(Close, 50); CrossOver = Cross(MA50, Close); CrossUnder = Cross(Close, MA50); LowRSI = RSI() < 30;
BarsSinceCrossOver = BarsSince(CrossOver); BarsSinceCrossUnder = BarsSince(CrossUnder);
Buy = LowRSI AND BarsSinceCrossUnder < BarsSinceCrossOver AND BarsSinceCrossUnder >= 5; Sell = ... // Your third signal here
--- In amibroker@xxxxxxxxxxxxxxx, "jminkkin" <jaakko.minkkinen@xxx> wrote: > > Hi all > > Any idea how to code conditional buy in following case: > > If price is over MA 50 and suddenly goes below for at least 5 bar. > THEN we wait for next occurrence for example RSI below 30. This is out > BUY. After that we do not care what ever happens to RSI but we wait > third signal to get wanted exit. > > I am sure this not magic but for beginners it is. >
__._,_.___
**** 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/
__,_._,___
|