Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Sign in to follow this  
olobay

Fibonacci Zone Pivots

Recommended Posts

Hi,

 

I am trying to convert the default Floor Trader Pivots included in MultiCharts to Suri Duddella's Fibonacci Zone Pivots but I don't think they are not plotting correctly. I will include both codes and maybe somebody with more EasyLanguage experience can help me out.

 

Thanks.

 

MultiCharts Floor Pivots:

inputs:
Plot_5or7( 5 ) ;                                                    

variables:
   var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ),
var7( 0 ),
var8( 0 ),
var9( 0 ),
var10( 0 ),
var11( 0 ),
var12( 0 ),
var13( 0 ) ;

if Date <> Date[1] then
begin

var13 = var13 + 1 ;
var8 = var7 ;
var10 = var9 ;
var12 = Close[1] ;
var7 = High ;
  	var9 = Low ;
var6 = ( var8 + var10 + var12 ) / 3 ;
var3 = var6 * 2 - var10 ;
var4 = var6 + var8 - var10 ;
var5 = var4 + var8 - var10 ;
var0 = var6 * 2 - var8 ;
var1 = var6 - var8 + var10 ;
var2 = var1 - var8 + var10 ;
end
else
begin
if High > var7 then
	var7 = High ;
if Low < var9 then
	var9 = Low ;
end ;

condition1 = var13 >= 2 and BarType < 3 ;
if condition1 then                                           

begin
if Plot_5or7 = 7 then
	Plot1( var5, "R3" ) ;
Plot2( var4, "R2" ) ;
Plot3( var3, "R1" ) ;
Plot4( var6, "PP" ) ;
Plot5( var0, "S1" ) ;
Plot6( var1, "S2" ) ;
if Plot_5or7 = 7 then
		Plot7( var2, "S3" ) ;
end ;

 

My attempt at Fibonacci Zone Pivots:

inputs:
Plot_5or7( 5 ) ;                                                    

variables:
   var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ),
var7( 0 ),
var8( 0 ),
var9( 0 ),
var10( 0 ),
var11( 0 ),
var12( 0 ),
var13( 0 ),
var14( 0 ),
var15( 0 ) ;

if Date <> Date[1] then
begin

var13 = var13 + 1 ;
var8 = var7 ;
var10 = var9 ;
var12 = Close[1] ;
var7 = High ;
  	var9 = Low ;
var6 = ( var8 + var10 + var12 ) / 3 ; //Pivot Point
var3 = var6 + (.5 * var14) ; //R1
var4 = var6 + var14 ; //R2
var0 = var6 - (.5 * var14) ; //S1
var1 = var6 - var14 ; //S2
var14 = var7 - var9; //Daily Range
var2 = var6 + (.618 * var14) ; //Resistance Band 1
var5 = var6 - (.618 * var14) ; //Support Band 1
var11 = var6 + (1.382 * var14) ; //Resistance Band 2
var15 = var6 - (1.382 * var14) ; //Support Band 2

end
else
begin
if High > var7 then
	var7 = High ;
if Low < var9 then
	var9 = Low ;
end ;

condition1 = var13 >= 2 and BarType < 3 ;
if condition1 then                                           

begin
if Plot_5or7 = 7 then
Plot2( var4, "R2" ) ;
Plot3( var3, "R1" ) ;
Plot4( var6, "PP" ) ;
Plot5( var0, "S1" ) ;
Plot6( var1, "S2" ) ;
if Plot_5or7 = 7 then
		Plot7( var2, "RB1" ) ;
		Plot8( var5, "SB1" ) ;
		Plot9( var11, "RB2" ) ;
		Plot10( var15, "SB2" ) ;
end ;

 

This is the formula from Suri's book:

 

FibZone Pivots

 

Pivot Point (PP) = (H+L+C)/3

Daily Range (DR) = (H-L)

First Resistance (Rl) = PP + 0.5*DR

Second Resistance (R2) = PP + DR

First Support (Sl) = PP - 0.5*DR

Second Resistance (S2) = PP - DR

Resistance Band (RB 1) = PP + 0.61 8*DR

Support Band (SB 1) = PP - 0.6 18*DR

Resistance Band (RB2) = PP + 1.382*DR

Support Band (SB2) = PP - 1.382*DR

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.