• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:15pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:15pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Multi time frame Simple MACD system 823 replies

Need help: Change my indicator to multi time-frame 0 replies

Converting LRC indicator to a Multi Time Frame Indicator 7 replies

Fractal based trendline indicator, horizontal fractal S/R indicator 6 replies

Question on Lower Time Frame Indicators Vs. Longer Time Frame 7 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 5
Attachments: Help with simple multi time frame fractal comparison indicator
Exit Attachments

Help with simple multi time frame fractal comparison indicator

  • Post #1
  • Quote
  • First Post: Apr 29, 2014 11:06pm Apr 29, 2014 11:06pm
  •  wilson2555
  • | Joined Nov 2010 | Status: Member | 12 Posts
Hi everyone,
I've been struggling with getting the code for this right for a while now. I'm very new to coding so really am fumbling through it, but am hoping someone will be kind enough to quickly knock something up for me. Hopefully it's a simple task for someone who knows what they're doing!

In essence, I want to compare the position of fractals on a timeframe higher than that which my chart is currently displaying. For the purpose of describing this, let's call it H1 v D1. So with reference to the below image, when fractal 'b' prints on the D1 chart, it is higher than fractal 'a', therefore the condition is satisfied because the most recent upper fractal is higher than the previous upper fractal. When fractal 'c' then prints the condition is no longer satisfied as now the most recent upper fractal is less than the previous upper fractal 'b'. So the coding requires storing the values of the most recent fractal and of one fractal previous and then comparing them. And then continually updating those values as new fractals are formed. Where I fall down is achieving this from the H1 chart, but referring to the D1 chart with a reference to the higher timeframe in the code.

And that's about it. Thanks in advance to anyone willing to offer me the code. For the purpose of the indicator the higher timeframe could be user defined in the indicator settings to allow the user to attach the indicator to any timeframe chart and then specify whatever higher timeframe they wish for comparison of the latest fractal higher high, lower high, lower low or higher low pattern. There's not much point in me attaching my current code as I've messed it right up!
Thanks!
Attached Image
  • Post #2
  • Quote
  • Apr 29, 2014 11:12pm Apr 29, 2014 11:12pm
  •  FerruFx
  • Joined May 2007 | Status: MT4/MT5 EAs/Indicators/Alerts coder | 6,844 Posts
Why don't you use a MTF fractals version ? There's plenty available here on FF.

Isn't what you need ?
MT4/MT5 EAs/Indicators/Alerts coder
 
 
  • Post #3
  • Quote
  • Apr 30, 2014 1:00am Apr 30, 2014 1:00am
  •  wilson2555
  • | Joined Nov 2010 | Status: Member | 12 Posts
Thanks for your reply, FerruFX
It's always the way but after searching for a long time without success I found this straight after my post....
http://www.forexfactory.com/showthread.php?p=4191180
I'll give it a crack.
Thanks
 
 
  • Post #4
  • Quote
  • Apr 30, 2014 7:55pm Apr 30, 2014 7:55pm
  •  wilson2555
  • | Joined Nov 2010 | Status: Member | 12 Posts
Hmmmm. No success.

Thanks for the suggestion of the MTF indicator, but I'm not trying to display the HTF fractal on the CTF chart, rather compare the most recent HTF fractal to the one before it, and then use that comparison along with about a dozen other rules within an indicator. The link I've posted above suggests code for this but my attempts to use this code have all failed, most likely due to an error on my part.

Anyone with a suggestion? Or instruction/code for using the above findFractal method?

Thanks again

ps happy to share the end product with anyone that can get me over this hurdle
 
 
  • Post #5
  • Quote
  • May 1, 2014 1:17am May 1, 2014 1:17am
  •  poruchik
  • Joined Dec 2006 | Status: Member | 719 Posts
Attached Image (click to enlarge)
Click to Enlarge

Name: eurusdh1fuy54.png
Size: 69 KB
Attached File
File Type: mq4 FractalsDetector.mq4   6 KB | 1 download
Attached File
File Type: ex4 FractalsDetector.ex4   8 KB | 864 downloads
 
 
  • Post #6
  • Quote
  • May 1, 2014 2:26am May 1, 2014 2:26am
  •  wilson2555
  • | Joined Nov 2010 | Status: Member | 12 Posts
Thank you
As I mentioned though, not after something to display the fractals, rather the code to compare them....
E.g. if ( Recent_HTF_Frac > Previous_HTF_Frac ) true; etc.
(it's ok, I know that's not correct )
 
 
  • Post #7
  • Quote
  • Jun 17, 2014 7:11pm Jun 17, 2014 7:11pm
  •  xux99
  • Joined Nov 2005 | Status: Member | 266 Posts
I have attached a version of FractalsDetector compatible with Metatrader 600+.
Attached File
File Type: mq4 FractalsDetector.mq4   5 KB | 1 download
 
1
  • Post #8
  • Quote
  • Jun 17, 2014 9:27pm Jun 17, 2014 9:27pm
  •  wilson2555
  • | Joined Nov 2010 | Status: Member | 12 Posts
Thanks mate, I'll check it out.
 
 
  • Post #9
  • Quote
  • Last Post: Feb 5, 2018 12:18am Feb 5, 2018 12:18am
  •  rbrick220
  • | Joined Feb 2018 | Status: Junior Member | 2 Posts
Am i correct that PlaySound() should go in the init function after the SetindexArrow?

Has anyone tried to convert this to an EA?
 
 
  • Platform Tech
  • /
  • Help with simple multi time frame fractal comparison indicator
  • Reply to Thread
0 traders viewing now
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022