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

Re: [amibroker] Re: code help



PureBytes Links

Trading Reference Links


bullish=O <=((H-L)*0.20)+L AND C >= H- ((H-L)*0.20) ;

bearish=O >=H-((H-L)*0.20) AND C <= ((H-L)*0.20)+L;

Bullishcond=Sum(bullish,2)==2;

bearishcond=Sum(bearish,2)==2;



Plot(C,"close",colorBlack,styleCandle);

PlotShapes(bullishcond*shapeUpArrow,colorBrightGreen);

PlotShapes(bearishcond*shapeDownArrow,colorRed);

/******************************************/

Filter=bullishcond OR bearishcond;

AddColumn(bullishcond,"bullish",1);

AddColumn(bearishcond,"bearish",1);

  ----- Original Message ----- 
  From: iascool 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, November 10, 2004 5:02 PM
  Subject: [amibroker] Re: code help



  HI Anthony
  I did run in th e AA window with filter of bullish condition and 
  bearish conidition as follows
  Filter= bullishcond AND bearishcond;
  AddColumn(bullishcond,"Go Long",1.2);
  AddColumn(bearishcond,"Go Short",1.2);
  .But i did not find the results I was expecting . Is it possible for 
  me to simply(without any RSI or ATR conditions) find such two 
  consecutive bars for bullish and bearish conditions in AA window.
  ie 1-) 1)Bullish- (2 bar consecutive) open should be in bottom 20% 
  of the days range and > close in top 20% of days range
  2-)Bearish (2 bar consecutive) open should be in top 20% of days 
  range and close in bottom 20% of days range

  PLease advise.

  Regards

  --- In amibroker@xxxxxxxxxxxxxxx, "iascool" <sai20_2000@xxxx> wrote:
  > 
  > Thanks Anthony,
  > I l look in to this code.Thanks for ur suggestion
  > Regards
  > 
  > --- In amibroker@xxxxxxxxxxxxxxx, "ajf1111us2000" <ajf1111@xxxx> 
  > wrote:
  > > 
  > > This should get you your Bullish and bearish conditions without 
  > Rsi 
  > > conditions....there are no hits when RSI conditions are added.
  > > 
  > > 
  > > bullish=O <=((H-L)*0.20)+L AND C >= H- ((H-L)*0.20) ;
  > > bearish=O >=H-((H-L)*0.20) AND C <= ((H-L)*0.20)+L;
  > > 
  > > Bullishcond=Sum(bullish,2)==2;
  > > bearishcond=Sum(bearish,2)==2;
  > > 
  > > 
  > > Plot(C,"close",colorBlack,styleCandle);
  > > PlotShapes(bullishcond*shapeUpArrow,colorBrightGreen);
  > > PlotShapes(bearishcond*shapeDownArrow,colorRed);
  > > 
  > > Anthony
  > > 
  > > --- In amibroker@xxxxxxxxxxxxxxx, "iascool" <sai20_2000@xxxx> 
  > 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 Sponsor 
              ADVERTISEMENT
             
       
       


------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
      
    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ 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/