Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 06-24-2009, 04:43 PM   #1

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Calculating the Fibonnaci Levels of a Candle

I'd like to qualify a study to check and see if the close of a candle is below or above the 78.6 retracement value of that candle. Except I can't seem to calculate the value to check correctly.

Code:
{C = B + (A — B) x N%}

This is for a downtrend candle.

	Step1 = High - Low;
	Step2 = Step1*.786;
	Step3 = Low + Step2;
	Plot4( Close, "IB FO S 78.6", IBShortColor );
	Plot9(""+ numtoStr(Step3,5),"78.6 Value");
	Alert("IB Fakeout S");
	end;

	NoPlot( 4 );
So that is what I was doing, which obviously doesn't quite work. Am i thinking about this wrong? Fibonacci is simply a measure of percentage of a given length in a market. Thus, if I want to measure a candle I need to measure the From the High to the Low, and then multiply that by .786 to get 78.6% measure of the candle right?

Last edited by daedalus; 06-24-2009 at 05:00 PM.
daedalus is offline  
Reply With Quote
Old 06-24-2009, 05:00 PM   #2

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: Calculating the Fibonnaci Levels of a Candle

I've been referencing this page for calculating it....

Fibonacci method in Forex - Calculate Fibonacci Levels

Have I done wrong?
daedalus is offline  
Reply With Quote
Old 06-24-2009, 05:01 PM   #3

atto's Avatar

Join Date: Mar 2008
Location: USA
Posts: 403
Ignore this user

Thanks: 112
Thanked 347 Times in 123 Posts
Blog Entries: 2

Re: Calculating the Fibonnaci Levels of a Candle

I don't know EasyLanguage (assuming that's what it is), but where are you measuring from (the high, low, median, something else)? Ret768 is just .768 * the spread, so "if Close < Ret768" will practically always be false (example, if ES closed at 900.00 and the spread is 10.00, you're asking "is 900.00 less than 7.68?"). If you're wanting .768*spread from the High, try something like this (again, I know nothing of this language):
Code:
...
if Close < High-Ret768 then
...
atto is offline  
Reply With Quote
The Following User Says Thank You to atto For This Useful Post:
daedalus (06-24-2009)
Old 06-24-2009, 05:22 PM   #4

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: Calculating the Fibonnaci Levels of a Candle

Nevermind gents... daddy cracked it! I was having issues because depending on which way the retracement is going you either need to multiply X .786 for longs, or by its inverse .214 for shorts.

Code:
Step1S = High - Low;
Step2S = Step1S*.214;
Step3S = Low + Step2S;
Step1L = High - Low;
Step2L = Step1L*.786;
Step3L = Low + Step2L;

//Then just check if the close is > < the 78.6 value of the candle....

if Close > Step3L then  //go long
If Close < Step3S then  //go short
Thanks for the help!
daedalus is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Value Area Soultrader Market Profile 35 09-19-2011 05:04 AM
Candle pattern Tams Trading Indicators 9 10-08-2010 04:36 PM
Big Candle Observation cowcool The Candlestick Corner 10 05-17-2009 09:49 AM
Calculating Intraday Turning Points jpflores Technical Analysis 22 09-04-2008 09:50 AM
Calculating daily pivots for spot Dr Who Forex Trading Laboratory 17 01-26-2007 08:46 AM

All times are GMT -4. The time now is 01:22 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.