[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Question re MA



PureBytes Links

Trading Reference Links

Hi,

I'm just wondering if I'm way off track here.  I am studying the 
relationship of bars and tracking higher highs/lows etc to get a 
change of trend.  If you apply a multiplier to the previous high you 
can get some very good results on the S+P and the FTSE (not the 
Dow).  What happens is that you get spiked from time to time and I 
want to prevent that.   So the primary signals come from the bar 
relationship and the secondary validation from the trend.  

I am determining a level for the MA with respect to 0 with <0 being a 
down trend etc.  The variable P1 will typically be -1 unless day -1 
is an inside day in which case it will be -2 etc:

MAlevel = ((MA(H-((H-L)/2), MAPeriod) - MA(Ref(H-((H-L)/2), P1), 
MAPeriod+P1))); 

I can then create a band around the MA and set optimised thresholds 
for the bands.  THis works on the S+P well but not the FTSE.

What I now want to do is predict at which point tomorrow I will get a 
change of trend - if it's down then there is a value that will take 
it positive.  

I think I'm suffering from codeitis.  I've been looking at my current 
300 lines of code for weeks and sometimes I fail to see the wood for 
the trees.

Anyone got any thoughts?

Thanks



John Rowlinson


--- In amibroker@xxxxxxxxxxxxxxx, "Bob Jagow" <bjagow@xxxx> wrote:
> MessageJohn,
> For your 15 day SMA, the cross is at C = MA = (15*MA0 -MA1st + 
C)/15, where
> 0 is yesterdays value.
> Therefore
> 15*MA = 15*MA0 -MA1st + MA
> MA =  (15*MA0 -MA1st)/14
> Might try the EMA also; it crosses when C = EMA0.
> 
> Bob
> 
> 
> 
>   -----Original Message-----
>   From: John Rowlinson [mailto:john@x...]
>   Sent: Tuesday, March 18, 2003 10:37 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Question re MA
> 
> 
>   Hi,
> 
>   Does anyone know how I can predict a trend change.  I want to 
know what
> value will make a MA go positive tomorrow.
> 
>   If I take the MA for the past 15 days and subtract the MA for one 
day back
> from the 15 days then if it's positive I am saying that the trend 
is up.
> 
>   How can I determine the value that will make it go negative?
> 
>   Thanks
> 
> 
>   John Rowlinson
> 
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/