PureBytes Links
Trading Reference Links
|
I searched the Library for flat bases, and consolidations,
and came up with nothing. I am barely starting to
comprehend a few aspects of AFL coding. I found an
indicator that I used as a model in my attempt to try to make an indicator
that would visually show when the distance between the open and close
is diminishing or expanding The first code below is
my MODIFICATION of the Indicator that I used as a model.
The second code below is the ACTUAL INDICATOR that I used as the
model. My attempt failed to work. My real goal
is to have scans that will be able to identify flat
bases, as well as other consolidation patterns. Buy
and sell arrows are not necessary for what I am wanting.
I will then need to be able run this scan on stocks whose
prices move up and down rapidly. I could then place an OCO order (one
cancels other) and catch it whichever way that it breaks out of the
consolidation pattern. Suggestions for improvements, as well as
original codes for consolidation patterns will be appreciated. Ron
D
<FONT face=Arial
size=2>===========================================================================
This is my effort
"Todays Open = "+<FONT color=#0000ff
size=1>WriteVal(O,<FONT color=#ff00ff
size=1>1.2);
"Todays Close = "+<FONT color=#0000ff
size=1>WriteVal(C,<FONT color=#ff00ff
size=1>1.2);
"Distance Open to Close = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>abs(O-C),<FONT color=#ff00ff
size=1>1.3);
"Largest Distance = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>Max(abs<FONT
size=1>(O-C)),1.3<FONT
size=1> );
"Smallest Distance = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>Min(abs<FONT
size=1>(O-C)) ,1.3<FONT
size=1> );
Plot( <FONT color=#0000ff
size=1>Max( <FONT color=#0000ff
size=1>abs(O-C) )<FONT
size=1>," Highest"<FONT
size=1>,colorGreen,styleLine);
Plot( Min<FONT
size=1>( abs<FONT
size=1>(O-C) ), <FONT color=#ff00ff
size=1>" Smallest"<FONT
size=1>,colorRed,styleLine);
<FONT
size=1>====================================================================
This is the code used as a model
/*this is an attempt to determine
the market range AND expansion AND market opens. The idea is to give an
idea of the potential risks AND rewards for any trade taken during
the Day, by knowing what A typical trading Day looks like.
I would need to do catalog the following:
Open
Low
High
Close
the distance from the Open to the Low
the distance from the Open to the High
the distance from the Open to the Close
the smallest distance from the Open for that Day
the largest distance from the Open for that Day
Then I would like to Plot the following:
the 10 Day average of the smallest distance
the 10 Day average of the largest distance*/<FONT
size=1>
"Todays Open = "+<FONT color=#0000ff
size=1>WriteVal(O,<FONT color=#ff00ff
size=1>1.2);
"Todays Low = "+<FONT color=#0000ff
size=1>WriteVal(L,<FONT color=#ff00ff
size=1>1.2);
"Todays High = "+<FONT color=#0000ff
size=1>WriteVal(H,<FONT color=#ff00ff
size=1>1.2);
"Todays Close = "+<FONT color=#0000ff
size=1>WriteVal(C,<FONT color=#ff00ff
size=1>1.2);
"Distance Open to Low = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>abs(O-L),<FONT color=#ff00ff
size=1>1.3);
"Distance Open to High = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>abs(O-H),<FONT color=#ff00ff
size=1>1.3);
"Distance Open to Close = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>abs(O-C),<FONT color=#ff00ff
size=1>1.3);
"Largest Distance = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>Max( <FONT color=#0000ff
size=1>Max(abs<FONT
size=1>(O-L),abs<FONT
size=1>(O-H) ) ,abs<FONT
size=1>(O-C) ),1.3<FONT
size=1> );
"Smallest Distance = "+<FONT color=#0000ff
size=1>WriteVal(<FONT color=#0000ff
size=1>Min(Min<FONT
size=1>(abs<FONT
size=1>(O-L),abs<FONT
size=1>(O-H) ),abs<FONT
size=1>(O-C) ),1.3<FONT
size=1> );
Largest10Avg = MA(
Max( <FONT
color=#0000ff size=1>Max(<FONT color=#0000ff
size=1>abs(O-L),<FONT color=#0000ff
size=1>abs(O-H)) ,<FONT color=#0000ff
size=1>abs(O-C) ),<FONT color=#ff00ff
size=1>10) ;
Smallest10Avg = MA(
Min( <FONT
color=#0000ff size=1>Min(<FONT color=#0000ff
size=1>abs(O-L),<FONT color=#0000ff
size=1>abs(O-H) ) ,<FONT color=#0000ff
size=1>abs(O-C) ) ,<FONT color=#ff00ff
size=1>10) ;
Plot(MA<FONT
size=1>( Max( <FONT
color=#0000ff size=1>Max(<FONT color=#0000ff
size=1>abs(O-L),<FONT color=#0000ff
size=1>abs(O-H)) ,<FONT color=#0000ff
size=1>abs(O-C) ),<FONT color=#ff00ff
size=1>10) ,"10MA
Highest"<FONT
size=1>,colorGreen,styleLine);<FONT color=#0000ff
size=1>
Plot(MA<FONT
size=1>( Min( <FONT
color=#0000ff size=1>Min(<FONT color=#0000ff
size=1>abs(O-L),<FONT color=#0000ff
size=1>abs(O-H) ) ,<FONT color=#0000ff
size=1>abs(O-C) ) ,<FONT color=#ff00ff
size=1>10), "10MA
Smallest",colorRed,styleLine);
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.
|