Hi Silon,

Yes it is possible (and even easy) to combine all three conditions to generate 
a buy signal.  

I'll be happy to code it, however you need to give me a few more details and I 
would like to see what you have tried first (you will learn more that way).  
Regrettably, the picture attached lacks sufficient detail to discern what you 
want, and I do not want to spend time trying to code something that isn't what 
you want. So what, if anything, have you tried to do for yourself? 

Now the deeded details:

First, do you want 2 or 3 days of up prices?  Or both? Or more?  And do you 
mean O > C or C > O (C>O doesn't make sense to me)? Open > prior Close?  C 
greater than the previous day C? Specifically, what do you mean by continuous 
up?

Second, what settings (periods) do you wish for the %K and %D stochastic and 
the PD+ and PD-?  Do you want the settings depicted in your attachment?  Note 
that for the stochastic there would be a basic periods (for both %K & %D, as 
well as one smoothing period for the %K and two smoothing periods for %D.  If 
you are not clear on the stochastic, consult the AB Tutorial or Google for 
George Lane and stochastic.  When you say %K rising, what do you mean -- higher 
than the prior day, or with a positive rate of change over X days, or ???? . 
Your attached picture looks like the first.

Third when you say %K > %D (or PD+>PD-) do you mean a cross that day (which 
your attachment suggests for DI+) or do you mean the condition of one being 
greater than the other, regardless of when the condition became true?

Finally, when you say vice versa for a Sell signal, do you mean everything 
flipped, i.e., 3 down days, DI- > DI+, and your stochastic %D > %K?

Writing code isn't hard, but defining what you mean is essential before you 
start. 

Peace and Justice   ---   Patrick
  ----- Original Message ----- 
  From: silon sama 
  To: [email protected] 
  Sent: Saturday, January 30, 2010 1:15 AM
  Subject: [amibroker] AFl Code -3 days continuous up+ adx rsinging [1 
Attachment]


  [Attachment(s) from silon sama included below] 

        Dear All member,


         can anybody wil help me to create AFL as per attachment :
        (1) Stock is continuous up from last 2or 3 days + and each of  day 
OPEN>CLOSE
                                         +
                           (2) ADX indicator  of  last day candle   +DI> -DI 
                                        +
                           (3)STOCHASTIC indicator at last day  %K>%D ..or K is 
rising 


        is it possible to combile all these three and generate BUY SIGNal and 
viceversa for SELL signal with arrow mark....i need it urgently 
        ...
        can any body help me to create this CODE

                     



  Attachment(s) from silon sama 

  1 of 1 Photo(s) 

  ablock.png

  

Reply via email to