of your code. See the help file for details on Plot(). When that is done,
plot a built-in price chart by finding it under the charts tab on the left
and double-clicking on it. Then find your code for MA under the charts tab,
drag it and drop it on the price chart.
To show a column in the exploration results, you need to use either
AddColumn or AddTextColumn functions in your code. Again, see the help file
for details. Also, read the tutorials in the help file.
Steve
----- Original Message -----
From: "peterjldyke" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 11, 2006 12:27 AM
Subject: [amibroker] Plot of MA Loop
> The following was supplied to another user in answer to a previous
> post. I have limited knowledge of loops etc so need help. The aim is
> to have the afl calculate a Moving Average that "sits" just below 12
> months (say 252 days) price action without the Close crossing below
> the computer calculated MA period. Only interested in strong
> uptrending stocks.
> I can't work out how to Plot the result or use the Explore feature
> to print out the result.
>
> function CheckMACross( period, Lookback )
> {
> result = False;
>
> Cma = MA( C, period );
>
> bar = BarCount - 1 - Lookback; //Max bars less Lookback.
>
> if( Close[ bar ] < Cma[ bar ] )
> {
> while( bar < BarCount )
> {
> if( Close[ bar ] > Cma[ bar ] )
> {
> result = True;
> }
>
> bar++;
> }
> }
>
> return result;
>
>
> }
>
> function WCBelowMALine()
> {
> found = False;
>
> for ( period = 1; period <= 252 AND NOT found; period++)
> {
> found = CheckMACross( period, 252 );
> }
> return period;
>
>
> What AA column headings do I use to get an "Exploration" of the
> Close and the calculated MA?
> How can I amend the above to get a Candlestick plot of the Close as
> well as a plot of the calculated MA?
>
> Any help would be appreciated.
> Peter
>
>
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
| Investment management software | Real estate investment software | Investment property software |
| Software support | Real estate investment analysis software | Investment software |
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
