PureBytes Links
Trading Reference Links
|
Jeff,
How about the following. It is an Exploration that draws Red Sell
arrows at each raw StochK crossing and Green Buy arrows at the filtered
crossings. Cut and paste the code into Auto-Analyser and see if it's what
you meant.
Paul
----------------------------------------------------------------------------------------------
OversoldThreshold = Param("Oversold threshold", 30, 0, 100,
1);DaysWindow = Param("Days window", 5);Cond = Cross( StochK( 14 ),
StochD( 14 ) ) AND ( StochK(14) <
OversoldThreshold);Filter = BarsSince(Cond) <= DaysWindow;V1 =
ValueWhen(Cond, Close, 1);V2 = ValueWhen(Cond, Close, 2);Buy = Cond AND
(V1 > V2); // Close value at StochK crossing > last StochK
crossing// Uncomment next line to see raw StochK crossings as Red Sell
arrowsSell = Cond;AddColumn( V1, "V1" );AddColumn( V2, "V2"
);AddColumn( Close, "Close " );AddColumn( Open, "Open "
);AddColumn( High, "High " );AddColumn( Low, "Low "
);AddColumn( Volume, "Volume " );
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
mrdavis9
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibrokeryahoogroups
Cc: <A title=framebyframe@xxxxxxxxxxx
href="">jeff davis
Sent: Thursday, 14 August 2003 4:00
PM
Subject: [amibroker] values of previous
stoch crosses.
This post is another attempt to get some help in
creating the additional coding that I need . I thank Jayson for responding to
my first post which detailed why I want to add additional coding to
my scans which include stoch crossings. Based on
my chart observations, this additional coding would greatly improve
the accuracy of any scan which includes the oversold
condition of
cross(stochk(14),stochd(14)) This AFL language
and technical terms are a real challenge to me. However, I
think that IIF will probably do what I want to do, but I can't
quite grasp the technical terms that are being discussed
in the below pasted TJ comments. I have never used this IIF feature
prior to now.
Once AFL finds an oversold stoch crossing at
value X, I want it to compare this X value to the
last oversold value of Y. If this previous value Y is higher
than the X value, than I want AFL to forget about it. However, if this
previous value of Y is lower than the present value of X, then I want AFL to
approve of the present stoch crossing that it found, and report it to me as
OK. I am going to paste below my first post below so that
you will have a complete understanding of what it is
that I want to do.) TIA for any help with
this. Ron
D
<FONT face=Arial
size=2>=======================================================================================
THIS IS THE ORIGIONAL POST,
These comments are based on what I
see by looking at charts, I think that all scans which include
cross( stochk(14), stochd(14)); can be improved, but I am not
experienced enough to code this possible improvement. IMHO there
are two code modules that would improve stoch crossing scans. . The
first of these modules would function as follows: It would tell a
scan that when it finds a stoch crossing, it must look back to all of
the previous buy and sell stoch crossings that occurred
consecutively while still under the stochastic value of 35. This
condition is what I refer to as stochastic kissing. The purpose of
this code module is to prevent a buy signal when it discovers that
kissing is happening. The other code module would look
back to at least to the most previous buy type crossing, and
it would prevent a buy arrow based on the value at which the
last buy type stoch crossing occurred. It will prevent a buy arrow if
the last buy crossing occurred at a stochastic value greater than the current
stochastic value under consideration. This module would allow
a buy arrow only if the present stochastic value is greater that the
stochastic value of the previous cross. I have other things in my
buy scans, but these code modules would improve any buy type scans that
include the stoch cross AFL function. The inverse logic of this would
also improve those scans that are looking for shorts. TIA for any ideas
or comments. Ron D
<FONT face=Arial
size=2>=======================================================================================
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|