MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Find How 300 000+ Users Liven Up MQL5.com
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2008.12.16 07:18
Candle Patterns

Candle Patterns - indicator for MetaTrader 4

| English Spanish Portuguese Russian

Views:
28504
Rating:
votes: 3
Candle_Patterns.zip (56.25 KB)
speak.dll (36 KB)
\MQL4\Include\
gSpeak.mqh (0.56 KB)view

Description:

I am gratefull to the following on which the code is based on: Japanese Candlesticks by http://www.candlesticker.com (which lists the various patterns for bear/bull scenarios) and CandleCode by Victor Likhovidov, references to be found at http://www.forexschool.ru

Setup:

Place files into the following subdirectories: |
Candle Patterns.mq4 into "\experts\indicators",
Candle Patterns.csv into "\experts\files",
Candle Patterns.rtd into "\experts\files",
Symbols_.csv into "\experts\files",
gSpeak.mqh into "\experts\include",
speak.dll into "\experts\libraries",
candle patterns.tpl into "\templates".
Close and then re-start MetaTrader for it to find the new files.
Select "Indicators" -> "Custom" -> "Candle Patterns".
The "Custom Indicator" window is displayed, select "Common" and enable "Allow DLL imports".

Inputs:

"Inputs" are described in file "Candle Patterns.rtd", alternatively right click on the chart and select "candle patterns.tpl" from "Templates".

I spent my youth in Kinshasa and if my programs come in usefull in your trading please let us help the people of the Democratic Republic of the Congo by donating what you can to: http://www.redcross.ie/help/donate_now.php?appeal=107 or any charity.

Take care, Teddy.

Last comments | Go to discussion (39)
MQL4 Comments
mql4_comments | 1 Jan 2011 at 22:45

MQL4 Comments
mql4_comments | 16 Mar 2011 at 15:41
sxTed:

Hi way2Freedom, the following method does not make use of iCustom(), take care, Teddy.

On the chart set up custom indicator "Candle Patterns" then call up your EA with the following included code:

void start() {
  static datetime tPreviousTime;
  string obj="CP_NAME", sPatternName="";
  
  // ..... code for OrderClose(), OrderDelete() and/or OrderModify()
      
  // code for retrieving pattern name, if present
  if(tPreviousTime == Time[0]) return;
  tPreviousTime=Time[0];
  if(ObjectFind(obj) >= 0) {
    // External Input Parameter "MaxBarsToScanForPatterns" of custom indicator "Candle Patterns" set to "1"
    sPatternName=ObjectDescription(obj);
    if(StringLen(sPatternName)<2) return; // no pattern
  }
  else {
    // External Input Parameter "MaxBarsToScanForPatterns" of custom indicator "Candle Patterns" set to "0"  
    obj="CP_"+Time[1];
    if(ObjectFind(obj) == -1) return; // no pattern
    sPatternName=ObjectDescription(obj);
  }
  
  // ..... code for testing of suitable pattern
  
  // ..... code for OrderSend()
}


Hey Teddy,

I don't know if you're around anymore, but I have a question.

Is it possible to output the pattern name to the indicator buffer as opposed to having it placed into an object?

While using the above method (which works great) there's no way to run any backtesting other than in visual mode since the the patterns are read from the object on the chart.

Even if it has to be a numeric value or even a color returned in the buffer it could be converted within the EA to the correct pattern name.

I really love this indi, but in order to make it work for my EA I need to use the iCustom parameter to get the actual pattern found as opposed to the buy sell signal.

Also I'd like to remove all the labels on the candles and the audio.

If you can help I would really appreciate it, or if anyone else here in the community could help that would be great too.

Thanks Teddy, I hope you're well and you haven't left us here :)

-Tai

Harryseehra
Harryseehra | 27 Apr 2011 at 08:25

hi,

I am not able to use the the above indicator as some files are missing

candle patterns.csv, candle patterns.rtd, and symbols.csv are missing.

Can anyone tell about that

Regards

MQL4 Comments
mql4_comments | 25 Sep 2012 at 14:03
harpreetseehra:

hi,

I am not able to use the the above indicator as some files are missing

candle patterns.csv, candle patterns.rtd, and symbols.csv are missing.

Can anyone tell about that

Regards



In the zip file.
MQL4 Comments
mql4_comments | 8 Feb 2014 at 10:58
hi can you help me . i have down load candle patters and instal it but it could not workink