Look for specific pattern in different time frames

 

How can i look for a specific price pattern in multi time frames?

It's how to make the code so it looks for my pattern in M5, M15, M30 .... that's my problem.

Thanks!

 

You can access the Open High Low Close bar values for any timeframe any symbol with functions like iLow(symbol,timeframe,barshift)

but for ideas on recognising a pattern that is probably books worth of disscussion.

 

Yeah i know Ickyrus, but i need to know how i can look for a pattern in diff. TF.

Thanks!

 
EagleEye:

Yeah i know Ickyrus, but i need to know how i can look for a pattern in diff. TF.

Thanks!

Hi EagleEye,


The post from Ickyrus is your best clue...there are many books and forums on recognizing patterns...


There are price patterns, candle patterns, trend patterns...and many many more types of patterns to trade forex.


In order to "look" for patterns in different TF's...you need to be able to define the "patterns" first.


Once defined, the next step is to code that "pattern definition" so you can use specific indicators and other strategies that are needed to find the patterns.


Going to multi-TF's is the next step, but that should not be too hard once the patterns and the indicators to find them are clearly defined for one timeframe.


Hope this helps,

Robert

 
EagleEye:

Yeah i know Ickyrus, but i need to know how i can look for a pattern in diff. TF.

Thanks!


Forgive me, but I have no idea what your programming level is or how much you know about programming methods.

To regcognise a pattern some people train neural nets to do this.

some people use the matematics of fractals,

some people use a set of indicators that cross over other indicator lines.

The term "pattern" is too vague and the techniques of spoting one are many.

The data source however is always the same and if you wnat something to work on different time frames then the EA can use the same code for recognising by 'feeding' the data from different time frames.

 

Hi Robert,

Thank you for your reply.

The pattern is not the problem, it could be whatever, an double bottom/top, inside bar, double doji ...

The problem is how can i see if there is a e.g. double doji in other time frames?

 
Ickyrus:


Forgive me, but I have no idea what your programming level is or how much you know about programming methods.

To regcognise a pattern some people train neural nets to do this.

some people use the matematics of fractals,

some people use a set of indicators that cross over other indicator lines.

The term "pattern" is too vague and the techniques of spoting one are many.

The data source however is always the same and if you wnat something to work on different time frames then the EA can use the same code for recognising by 'feeding' the data from different time frames.


Ok let's make it easier.

I want to look for an inside bar on all time frames and get an alert if it occours.

 

You could look at and improve this https://www.mql5.com/en/code

 
Ickyrus:

You could look at and improve this https://www.mql5.com/en/code


Thanks Ickyrus,

Yes it seems to be able to work in all timeframes.

Thanks!

 
EagleEye:


Ok let's make it easier.

I want to look for an inside bar on all time frames and get an alert if it occours.

Hi EagleEye,

Now that you have selected a "Pattern"...an Inside Bar... you can now code it...

Inside Bar Definition - What is an Inside Bar ?
An inside bar is a bar or series of bars which is/are completely within the range of the preceding bar, or, i.e. it has a higher low and lower high than the bar immediately before it

Sample Basic Coding for Inside Bar:

Low[0] < Low[1] (current bar LOW is a higher than past bar LOW)
&& High[0] < High[1] (current bar HIGH is lower than past bar HIGH)

Then you add the MTF code... Replace the "0" with the TF's for each timeframe you want to find the patterns in:

(iHigh(NULL, 0,0) < iHigh(NULL, 0,1) && iLow(NULL, 0,0) > iLow(NULL, 0,1))

If you do a search for Inside Bar and you can find EA's already built that has the code you are looking for. Same for alerts.

Hope this helps,

Robert

Edit - I see Ickyrus already found a great example for you. Hope that works out.

 

Thanks Robert for the example, it might be helpfull to me as well.

Thanks guys!

Reason: