Hi Silon,
Apologies for delay -- lots going on at my end.
I'm in trading just now, so I'll have to wait for market to close before
spending much more time on this. However as I originally said, this isn't
difficult to code once you write out the conditions you are looking to be
met.
What have you tried so far? As an example to get you
started (and without doing this is AB, but it should work) consider
the following to code for two days up (your definition: Open> previous day's
close + close >close of previous day):
PCondUP2 = ( O > ref(C,-1) and C >
REF(C,-1) ) AND ( REF(O,-1) > REF(C,-2) AND REF(C,-1) > REF(C,-2) )
;
Do you see how to refer to the open or close and the
prior close as well as tie price actions for different days together? The
same will work for any array (StochK(15,3) , PDI(14), etc. While you could
run all coding into a single Filter = , when you first start out (and even
later), I recommend writing out each of your conditions as a separate statement
and then linking them in the filter as Filter = PCondUP2 and PCondUP3 and ...
etc. That way if you have a problem with your coding, you can isolate it quickly
or if you decide you want to add or delete conditions, it is relatively easy to
do so. This condition approach also allows for easy construction of Buy or
Sell statements, putting signals (arrows, triangles, etc.) on a chart,
as well as constructing different ribbons to depict conditions or coloring
your candles based on one or more conditions. Adding information in a
title statement is also facilitated. Complex code execution can also be
speeded up by making conditions dependent on each other.
I'll check back in a few hours after the market closes
to see how you are doing. I would rather you learn how to fish than I just
give you a fish to eat today.
Peace and Justice ---
Patrick
----- Original Message -----
Sent: Wednesday, February 03, 2010 8:46
AM
Subject: Fw: [amibroker] AFl Code -3 days
continuous up+ adx rsinging
hi NWTRADER can u please give me sollution --- On
Sat, 1/30/10, silon sama <u4my1986@xxxxxx com>
wrote:
From:
silon sama <u4my1986@xxxxxx com> Subject:
Fw: [amibroker] AFl Code -3 days continuous up+ adx rsinging [1
Attachment] To: amibroker@xxxxxxxxx ps.com Date:
Saturday, January 30, 2010, 11:57 PM
pls suggest me wat to do --- On Sat,
1/30/10, silon sama <u4my1986@xxxxxx com>
wrote:
From:
silon sama <u4my1986@xxxxxx com> Subject: [amibroker]
AFl Code -3 days continuous up+ adx rsinging [1
Attachment] To: amibroker@xxxxxxxxx ps.com Date:
Saturday, January 30, 2010, 2:45 PM
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
|
|
|