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

RE: [amibroker] Backtest - Data Processing



PureBytes Links

Trading Reference Links

Thanks Graham

You are on the right track, however this is not what Fibonacci lines 
are all about. Amibroker can draw the lines but i dont know how to 
use this in exploration. At the following site I found the formuala 
for Fibnacci Numbers but I have not figured out how to apply them to 
stock price low to highest high or most recent high. 
http://www.stockstoshop.com/fibonaccinumbers.htm or see below:
If you got to the site you can see a chart diagram of MSFT.

Thanks
MR

Fibonacci Numbers

Fibonacci numbers measure the amount the market has retraced 
compared to the overall market movement. Fibonacci numbers are 
ratios, which are mathematical in nature derived from the Fibonacci 
sequence, which was developed by Leonardo Fibonacci.

Fibonacci retracements are commonly drawn from the beginning of Wave 
1 to the top of Wave 3 to find a target to the Wave 4 retracement.

Fibonacci numbers are the numbers in the Fibonacci sequence 0, 1, 1, 
2, 3, 5, 8, 13, 21, . . . , each of which, after the second is the 
sum of the two previous ones. 

Fibonacci numbers can also be considered as a function of non-
negative integers: 

       n  = 0, 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11,  12, ...
     F(n) = 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ... 
The exact closed form solution for this function is called the Binet 
formula: 

     F(n) = (Phi^n - PhiP^n)/Sqrt(5),
     where Phi = (1 + Sqrt(5))/2 = the Golden Ratio,
     and PhiP = Phi Prime = (1 - Sqrt(5))/2 = 1 - Phi = -1/Phi,
Since F(n) is an integer and the magnitude of PhiP^n/Sqrt(5) is less 
than 1/2 for n >= 0, a variant form of the formula is: 

     F(n) = Round(Phi^n / Sqrt(5)), n >= 0.
Fibonacci numbers can also be defined for negative n: 

     F(-2 n) = -F(2 n)
     F(- 2 n - 1) = F(2 n + 1)

       n  = ..., -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, ...
     F(n) = ..., -8,  5, -3,  2, -1,  1, 0, 1, 1, 2, 3, 5, 8, ... 
The continuous analytic function: 

     F(x) = (Phi^x - |PhiP|^x)/Sqrt(5),
passes through all Fibonacci numbers of even n = x (n positive or 
negative). 

The continuous analytic function: 

     F(x) = (Phi^x + |PhiP|^x)/Sqrt(5),
passes through all Fibonacci numbers of odd n = x (n positive or 
negative).




--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> Not certain exactly what you are wanting, so I will enclose an 
example to
> see if it helps. This is finding the last 260 day high, then the 
260 day low
> prior to that, and plotting these with the 38% retracement from 
the high.
> 
> 
> L52 = LastValue( Ref(LLV(L,260),-H52bar-1) );
> 
> L52bar = LastValue( BarsSince(L==L52) );
> 
> change = H52-L52;
> 
> Retrace38 = H52 - change*0.38;
> 
> Plot(C,"price",colorBlack,styleBar);
> 
> Plot(IIf(BarIndex()>=(BarCount-1- H52bar), ValueWhen(H==H52,H), 
Null),
> "H52", colorRed,
> 
> styleLine);
> 
> Plot(IIf(BarIndex()>=(BarCount-1- L52bar), ValueWhen(L==L52,L), 
Null),
> "L52", colorRed,
> 
> styleLine);
> 
> Plot(IIf(BarIndex()>=(BarCount-1- H52bar), Retrace38, Null), "Retr 
38%",
> colorGreen,
> 
> styleLine);
> 
> GraphXSpace=5;
> 
> 
> 
> Cheers,
> Graham
> http://www.golala.com/forums/?mforum=asxsharetrading
> http://groups.msn.com/fmsaustralia
> 
> -----Original Message-----
> From: mroman59 [mailto:mroman59@x...]
> Sent: Saturday, 24 January 2004 8:06 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Fibonacci Formulas? Help anyone
> 
> 
> Does anyone have the formula for determining the price of a stock
> that retraces using the popula fibonacci % lines. I am alittle
> confused, when i draw the lines using AB from lo to hi point it
> gives me the %lines and a value. However the value does not seem to
> correlate with the %retracement.  For example, when i calculate the
> % that a stock has retraced from its 52 week hi the value does not
> match the with the lines drawn nor does the value 38.2% line value
> correlate with actual 38.2% retracment of the stocks value. Now 
that
> I have you confused and myself can anyone help me?  I am trying to
> create an exploration or indicator that will alert me when a stock
> in my watchlist has retraced to one of these values.
> 
> Thank YOu
> MR
> 
> 
> 
> 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
> 
> ------------------------ Yahoo! Groups Sponsor --------------------
-~--> Buy
> Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark 
Printer
> at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
> http://www.c1tracking.com/l.asp?cid=5511
> http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
> -------------------------------------------------------------------
--~->
> 
> Yahoo! Groups Links
> 
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
> 
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
> 
> Your use of Yahoo! Groups is subject to:  
http://docs.yahoo.com/info/terms/


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 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/amibroker/

To unsubscribe from this group, send an email to:
 amibroker-unsubscribe@xxxxxxxxxxxxxxx

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/