[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] code help



PureBytes Links

Trading Reference Links

always best to try to keep ratios with positive numbers. You can use
ABS() or just make certain the higher numbers are first
Cond1=((C-L)/(H-L))>0.8 AND ((H-O)/(H-L))>0.8 AND RSI(14)<30 and
ROC(RSI(14),2)>0;

I have no idea what your buy statement AVG>ATR(10) means Avg is
(H+L+C)/3 ATR is the average of the changes bar to bar. I would expect
the condition as writren to always be true. Also if it is not true
then buy will always be true anyway as it would be Buy=1

buy =iif( AVG>ATR(10),cond1,1);

you could just write Buy = cond1;


On Tue, 09 Nov 2004 05:22:41 -0000, iascool <sai20_2000@xxxxxxxxx> wrote:
> 
> 
> Hello,
> i want to find out two consecutive bullish or bearish bars , for
> following conditions
> 1)Bullish- open should be in bottom 20% of the days range and close
> in top 20% of days range and rsi below 30 rising
> 2) Bearish - open should be in top 20% of days range and close in
> bottom 20% of days range.and rsi above 75 falling
> Both the bars range should be above ATR(10)
> 
> For the bullish bar I have partially tried to put the condition as
> folows but results not to mark
> // for bullish
> Cond1=((C-L)/(H-L))>0.8 AND ((O-H)/(H-L))>0.8 AND RSI(14)<30;
> buy =iif( AVG>ATR(10),cond1,1);
> 
> kind Regards
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/