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  

  • Topics

  • Posts

    • IMHO, demo contests with a cash prize tend to cause new traders to take unrealistic risks because they're literally risking nothing to win something. I wouldn't get into the habit of that.😬
    • I posit that traders should code auto-trading bots, or use a platform interface that supports building bots without coding, and then backtest everything in demo before trading at all. @aimhi, I believe that you have already posted this in another thread.🤓
    • Strange... I can't seem to view your PNG image.😕
    • A custom Better Daily Range indicator for MT5 is now available on the Metaquotes website and directly in the MT5 platform. https://www.mql5.com/en/market/product/103800 The Better Daily Range indicator shows the previous trading day's price range on the current day's chart. Many traders mark out the previous day's high, low, and the current day's open before trading. This is not an average true range indicator (ATR). This is not an average daily range indicator (ADR). This is a daily range indicator (DR). This indicator shows horizontal maximum and minimum range lines. If your broker-dealer's MT5 platform shows Sunday bars, Sunday bars are not included as previous days. In other words, Monday uses Friday's price data (skips Sunday). This indicator also shows two 25% (of range) breakout lines: one that is 25% higher than the maximum range line, and one that is 25% lower than minimum range line. A middle range line is also shown. Immediately after the daily close of your broker-dealer, all five range lines update to the new daily values.   Many traders only trade during times of high volume/liquidity. The Better Daily Range indicator also shows five adjustable time separator lines: A local market open time line (a vertical line), A local market middle time A line (a vertical line), A local market middle time B (a vertical line), A local market middle time C (a vertical line), A local market close time (a vertical line), and A local market open price (a horizontal line). The location of the local market open price depends on your input local market open time. In other words, you input your desired market open time according to your local machine/device time and the indicator automatically shows all five session lines. When your incoming price bars reach your input local market open time line, the indicator automatically shows the price to appear at your input local market open time. If your broker-dealer's MT5 platform shows Sunday bars, the time separator lines do not show on a Sunday. Immediately after midnight local machine/device time, the five session time lines (vertical lines) are projected forward into the current day (into the future hours) and the local open price line is erased. The local open price line reappears when the price bars on the chart reach your input local open time (your local machine/device time).   The indicator has the following inputs (settings):   Chart symbol of source chart [defaults to: EURUSD] - Allows you to show data from another chart symbol other than the current chart symbol. Handy for showing standard timeframe data on an MT5 Custom Chart. Local trading session start hour [defaults to: 09] - Set your desired start hour for trading according to the time displayed on your local machine/device operating system (all times below are your local machine/device operating system times). The default setting, 09, means 9:00am. Local trading session start minute [defaults to: 30] - Set your desired start minute. The default setting, 30, means 30 minutes. Both the default hour and the default minute together mean 9:30am. Local trading session hour A [defaults to: 11] - Set your desired middle hour A for stopping trading when volume tends to decrease during the first half of lunch time. The default setting, 11, means 11:00am. Local trading session minute A [defaults to: 00] - Set your desired middle minute A. Both the default hour and the default minute together mean 11:00am. Local trading session hour B [defaults to: 12] - Set your desired middle hour B for the second half of lunch time. The default setting, 12, means 12:00pm (noon). Local trading session minute B [defaults to: 30] - Set your desired middle minute B. Both the default hour and the default minute together mean 12:30pm. Local trading session hour C [defaults to: 14] - Set your desired middle hour C for resuming trading when volume tends to increase. The default, 14, means 2:00pm. Local trading session minute C [defaults to: 00] - Set your desired middle minute C. Both the default hour and the default minute together mean 2:00pm. Local trading session end hour [defaults to: 16] - Set your desired end hour for stopping trading. The default setting, 16, means 4:00pm. Local trading session end minute [defaults to: 00] - Set your desired end minute for stopping trading. Both the default hour and the default minute together mean 4:00pm. High plus 25% line color [defaults to: Red]. High plus 25% line style [defaults to: Soid]. High plus 25% line width [defaults to 4]. High line color [defaults to: IndianRed]. High line style [defaults to: Solid]. High line width [defaults to: 4]. Middle line color [defaults to: Magenta]. Middle line style [defaults to: Dashed]. Middle line width [defaults to: 1]. Low line color [defaults to: MediumSeaGreen]. Low line style [defaults to: Solid]. Low lien width [defaults to: 4]. Low minus 25% line color [defaults to: Lime]. Low minus 25% line style [defaults to: Solid]. Low minus 25% line width [defaults to: 4]. Local market open line color [defaults to: DodgerBlue]. Local market open line style [defaults to: Dashed]. Local market open line width [defaults to: 1]. Local market middle lines color [defaults to: DarkOrchid]. Local market middles lines style [defaults to: Dashed]. Local market middles lines width [defaults to: 1]. Local market close line color [default: Red]. Local market close line style [Dashed]. Local market close line width [1]. Local market open price color [White]. Local market open price style [Dot dashed with double dots]. Local market open price width [1].
    • A custom Logarithmic Moving Average indicator for MT5 is now available for MT5 on the Metaquotes website and directly in the MT5 platform. https://www.mql5.com/en/market/product/99439 The Logarithmic Moving Average indicator is a moving average that inverts the formula of an exponential moving average. Many traders are known to use logarithmic charts to analyze the lengths of price swings. The indicator in this post can be used to analyze the logarithmic value of price on a standard time scaled chart. The trader can set the following input parameters: MAPeriod [defaults to: 9] - Set to a higher number for more smoothing of price, or a lower number for faster reversal of the logarithmic moving average line study. MAShift [defaults to: 3] - Set to a higher number to reduce the amount of price crossovers, or a lower for more frequent price crossovers. Indicator line (indicator buffer) can be called with iCustom in Expert Advisors created by Expert Advisor builder software or custom coded Expert Advisors: No empty values; and No repainting.
×
×
  • Create New...

Important Information

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