Kaufman AMA break out EA

To add comments, please log in or register
Mladen Rakic
160518
Mladen Rakic  

First a description of reasons for making this EA (apart from the obvious ones ):

_________________________________

Due to coders laziness I guess, or due to ignoring the possible errors in EA execution, EAs with proper code execution error management, order exceptions execution and error management are very rare (frankly I have seen just 1 till now that could be called a serious one (of course that is only my opinion)) and people trying to build on the code found that way are more or less in a dead end street. This one should help a bit such developers. Which brings me to second reason posting this : some members of elite and advanced elite have asked me if I can recommend a frame that they could use for their own EA development. Well, this is the one

It covers most common things that usually an EA should have :
- ECN/STP broker orders execution and management

- hedge / no hedge rules

- automatic (as %) or manual risk management

- number of simultaneously opened orders

- number of trades made on a single bar

- time filters for trading

- usual stop loss and take profit management

- and so on ...

Parameters and features specific to this EA will be described in next post Feature that I think you will not be able to find anywhere else :
Some time ago newdigital and me were discussing how EAs should work and we came to conclusion that the ideal way how EA(s) should work is to communicate between each other and to "tell" each other whether one should work or what should one do. Idea is good, but the solution for it is not so obvious. Some ways that do not work :
  • using global variables - machine and metatrader instance specific : EA(s) run from another folder or another PC will have no idea about the global variables managed by one instance of the EA. Removing metatrader installation removes global variables states too, so you are left in a dark in cases like that
  • using files to communicate : it could be managed to have a sort of "common folder" for files (to bypass metatraders limitation as of where files can be written) but it would still leave the problem of EAs running on different PC
  • using some ftp to communicate could be achieved, but is time costly (it would take precious time from order execution just to send some "messages") and money costly in the end if one requires reliable ftp
This one has a solution for that and the solution is the simplest there is and suffers from none of the mentioned limitations. It uses broker for that and is just account specific (which is normal, since, in my opinion, it should be account specific) In this one, for example, it can happen that n EAs are working and when an order to close orders comes all n EAs are closing orders

So, this one is the first one in the direction of multi EA system when a couple of EAs (different EAs) could work together and which could send and receive "messages" to and from each other

_________________________________

The EA was extensively tested for a couple of months. As far as the results of this specific EA are concerned they are not a "holly grail", but are not bad either. We did not test the trading results as much as the execution and messaging system. Trading results are a task and a subject to improvement and in this thread improvements for this specific EA are going to be posted

Mladen Rakic
160518
Mladen Rakic  

Kaufman AMA breakout EA parameters :

_____________________________

General parameters :
MagicNumber-> the usual unique number to identify EA instance

EcnBroker-> type of your broker. If true, it is ECN/STP broker, else regular broker

NoHedge-> does your broker allow hedging or not

UseAutomaticMM-> do you want automatic lot size calculation depending on equity / stop loss / risk settings or not

AllowMultipleTradesOnBar-> do you want to allow multiple trades (not orders) on a single bar. If set to false and an order was closed on a current bar, new order will not be opened until the bar closes, otherwise a new order will be opened as soon as there is no orders opened on a current bar

AllowTradesOnEverySignal-> do you want orders to be opened on every Kaufman AMA signal or just on the first signal it generates

AllowOnlyOneActiveTrade-> do you want to allow only one active order or you allow multiple orders opened

Risk-> % that can be risked per single order

BaseLot-> lot size you want to use if automatic MM is disabled or risk is set to 0CloseOnTrendChange-> do you want the opened orders to be closed regardless of their profit state if the trend changes direction

Position specific parameters :
TakeProfitPips-> initial take profit for an order

StopLossPips-> initial stop loss for an order

CloseWhenProfit-> do you want all the opened orders closed when profit reaches specified amount or to disable this feature enter 0

CloseWhenLoss-> similar to CloseWhenProfit but loss is taken into account

AllSymbolsForProfitAndLoss-> do you want to use all the symbols that this EA is trading on from profit loss calculation or just the one that the EA is attached to

StopWhenClosedAllTrades-> should the EA stop trading till next day when CloseWhenProfit or CloseWhenLoss are triggered and reached or it can continue trading according to time filter

Used indicators specific parameters(will leave these without explanation, since I think they are self explanatory) :
Kaufman AMA parameters :
KAMA.Period

KAMA.Price

KAMA.Nfast

KAMA.Nslow

KAMA.GCoeff

KAMA.dk

KAMA.BarToCheck -> check Kaufman AMA signal on current opened bar (0) or any other n-th closed bar

Simple moving average :
SMA.UseForEntry -> Use simple moving average (5) slope direction as a trend confirmation or not
Dynamic EMA trailing stop :
UseEMATrailingStop

EMA.timeFrame

EMA.price

EMA.period

EMA.barToUse

EMA.initialStopLoss

Time filter specific parameters :
Trade.startFrom

Trade.endAt

Trade.useServerTime
-> use server time or local (PC) time
Other parameters :
AllowedSlippage

showMessages

_____________________________

Recommended time frame for running this EA :5 minutes

Mladen Rakic
160518
Mladen Rakic  

...

Kaufman AMA breakout files

Up to date file are going to be kept on this post

Sergey Golubev
Moderator
114343
Sergey Golubev  

Just want to quote it as it is very important because this EA is the first step to so called EA of the EAs (old senior elite members know this good idea so this EA is the first step to do so).

mladen:

Some time ago newdigital and me were discussing how EAs should work and we came to conclusion that the ideal way how EA(s) should work is to communicate between each other and to "tell" each other whether one should work or what should one do.

So, this one is the first one in the direction of multi EA system when a couple of EAs (different EAs) could work together and which could send and receive "messages" to and from each other

Sergey Golubev
Moderator
114343
Sergey Golubev  

The Settings

I am using 0.09 version of this EA for the more than 6 months (you can see it from RAS service signals with same name).

This 0.11 version is improved 0.09 version so I think - my settings will be valid for this 0.11 version too.

I will start testing/trading this 0.11 version woth some ECN broker from next week.

I am trading (not backtesting!) the following pairs:

EURUSD, GBPUSD, USDJPY, USDCHF, AUDJPY, AUDUSD, EURJPY, GBPCHF, EURGBP, GBPJPY, NZDUSD, USDCAD, EURCHF, NZDJPY.

M5 timeframe.

Some pairs are very profitable, some of them are not profitable, some of them are averaging.

Most profitable pairs (since October 2009 trading) are the following:

AUDUSD

EURJPY

USDCHF

USDJPY

The settings are the same for all the pairs but magic number is different: every pair/chart is having unique magic number (just use any non-repeated number in the settings for every symbol traded).

I am using non-ECN/non-stp broker and non-IBFX so in my settings:

EcnBroker = false;

NoHedge = false

If your broker is ECN/stp so use EcnBroker = true,

If your broker is IBFX compatible so use NoHedge = false.

The settings:

------------------------

------------------------

MagicNumber = 190717;

EcnBroker = false;

NoHedge = false;

UseAutomaticMM = false;

AllowMultipleTradesOnBar = false;

AllowTradesOnEverySignal = true;

AllowOnlyOneActiveTrade = False;

Risk = 1.50;

BaseLot = 0.01;

CloseOnTrendChange = true;

TakeProfitPips = 150;

StopLossPips = 100;

CloseWhenProfit = 2;

CloseWhenLoss = 0;

AllSymbolsForProfitAndLoss = false;

StopWhenClosedAllTrades = true;

KamaIndicator = "Indicators settings";

KAMA.Period = 26;

KAMA.Price = PRICE_CLOSE;

KAMA.Nfast = 5;

KAMA.Nslow = 20;

KAMA.GCoeff = 2.0;

KAMA.dk = 2.0;

KAMA.BarToCheck = 1;

____MinorEntry = "Using fast SMA for entries too";

SMA.UseForEntry = false;

____EmaTrailingStop = "Ema trailing stop settings (if used)";

UseEMATrailingStop = true;

EMA.timeFrame = 1440;

EMA.price = 0;

EMA.period = 25;

EMA.barToUse = 5;

EMA.initialStopLoss = 100;

____TimeFilter = "Time filter settings";

Trade.startFrom = "07:00";

Trade.endAt = "17:00";

Trade.useServerTime = true;

____Other = "";

AllowedSlippage = 0;

showMessages = false;

------------------------

------------------------

Sergey Golubev
Moderator
114343
Sergey Golubev  

If you guys can find your own settings so please post it here.

Sergey Golubev
Moderator
114343
Sergey Golubev  

Just want to quote it as it is very important because this EA is the first step to so called EA of the EAs (old senior elite members know this good idea so this EA is the first step to do so).

mladen:

Some time ago newdigital and me were discussing how EAs should work and we came to conclusion that the ideal way how EA(s) should work is to communicate between each other and to "tell" each other whether one should work or what should one do.

So, this one is the first one in the direction of multi EA system when a couple of EAs (different EAs) could work together and which could send and receive "messages" to and from each other

Just look at those 2 threads to understand what it is about:

https://www.mql5.com/en/forum/175657

https://www.mql5.com/en/forum/178788

So, this EA is the first (very close to final) step to create our dream: EA of the EAs.

William Snyder
9493
William Snyder  
newdigital:
Just want to quote it as it is very important because this EA is the first step to so called EA of the EAs (old senior elite members know this good idea so this EA is the first step to do so).

Just look at those 2 threads to understand what it is about:

https://www.mql5.com/en/forum/175657

https://www.mql5.com/en/forum/178788

So, this EA is the first (very close to final) step to create our dream: EA of the EAs.

Thank you Newdigital and Mladen been struggling this last month trying to add a newsfilter using Tsd calender but wanted a different type of filter, one that would give you an opportunity to maybe close trades from one Ea then possibly trade the news with an on or off type switch, with the Newstrader Ea built in, then reopen or start trading with regular Ea again, but sounds like you all are all ready close to this in a much better and very interesting way.

killerpips
18
killerpips  

Thank for sharing all that great work.

Can i try it on a 5 digits brooker directly ?

Mladen Rakic
160518
Mladen Rakic  

Yes

It adapts automatically to broker digits

regards

mladen

killerpips:
Thank for sharing all that great work. Can i try it on a 5 digits brooker directly ?
frederic Whitlock
73
frederic Whitlock  

Thank for sharing this EA

great work looks very good found this today

started test on E global today

will keep you posted

To add comments, please log in or register