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

Source code library - Expert Advisors, Indicators and Scripts

MetaTrader Market: we have 650 Expert Advisors for algorithmic trading!
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

2009.11.11 10:41
Candlestick models for GBP/JPY for 9 years

Candlestick models for GBP/JPY for 9 years - expert for MetaTrader 4

| English Spanish Portuguese Russian

Views:
6396
Rating:
votes: 3
for_max_v2.mq4 (5.78 KB)view
\MQL4\Include\
Kimiv.mqh (169.77 KB)view

Author:

Kontra

Description:

An Expert Advisor uses the Candlestick Models for trading: Blending Candlesticks (Engulfing) and Hammer(inverted Hammer)/Shooting Star models

It has been tested at GBP/JPY, M15. The extended 9 year trading report can be found here.

Parameters:

extern int bTp = 100; // Profit for buy
extern int sTp = 100; // Profit for sell
extern int zazor= 1; // Distance from the previous bar High/Low (for orders)
extern int Max_Search = 100; // Bars count for the price extremum search
extern int OrderExp = 8; // Life time (in hours) for pending order
extern int MagicType1 = 11111; // Magic number for the first type of deals
extern int MagicType2 = 22222; // Magic number for the second type of deals
extern int MagicType3 = 33333; // Magic number for the third type of deals
extern double StartLot = 0.1; // Deal volume

extern bool TSProfitOnly = True; // Trailing stop for profit only
extern int TStop.Buy = 50; // Trailing stop for buys (in points)
extern int TStop.Sell = 35; // Trailing stop for sells (in points)
extern int TrailingStep = 3; // Trailing stop step (in points)
extern int LevelProfit = 25; // Profit (in points)
extern int LevelWLoss = 1; // Without Loss level (in points)

I have some improvement ideas, the comments are welcome.

I would like to ask you to add a confirmation of the next candle closing price to the conditions of orders opening:

If a buy signal - the closing price of the candle, crossed the entrance level in the old scheme, should be above the old level of the entrance. Buy immediately after such closing. This candle does not necessarily have to be exactly next. As it has illustrates at figure. Main confirmation is close above the old entrance.

If a sale signal - then the closing price of the candle, crossed the old entrance level, should be below the old entrance level. Sell immediately after such close!


History backtesting results:


Image:




Translated from Russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/9309

Last comments | Go to discussion (3)
MQL4 Comments
mql4_comments | 16 Nov 2009 at 16:00

sorry but I can not use it, see only a grey file max v2 in the experts folder, when I move it in eg. GBP/JPY, M15 chart there is no smiley,

I can compile it, but this is not a runable version; kimiv.mqh I moved it to experts\include

Automated-Trading
Automated-Trading | 17 Nov 2009 at 10:33
fixfoxi13:

sorry but I can not use it, see only a grey file max v2 in the experts folder, when I move it in eg. GBP/JPY, M15 chart there is no smiley,

I can compile it, but this is not a runable version; kimiv.mqh I moved it to experts\include

Try these paths:

C:\Program Files\MetaTrader 4\experts\include\Kimiv.mqh

C:\Program Files\MetaTrader 4\experts\experts\for_max_v2.mq4

Note that it's an English translation of the original Russian version. So the additional details and discussions are there.

If you don't speak Russian, look at Google Translated version.

MQL4 Comments
mql4_comments | 13 Apr 2012 at 16:35
To many Errors!