OILFXPRO slave master EA
  #1 (permalink)  
Old 12-07-2007, 06:38 AM
oilfxpro's Avatar
Forex Warrior
 
Join Date: Nov 2007
Posts: 285
Thanks: 9
Thanked 16 Times in 12 Posts
oilfxpro is on a distinguished road
Default OILFXPRO slave master EA

Hi friends

Here is another free Expert Adviser to this community.This Expert Adviser belongs to me and I paid money for it .It may require further development and coding and testing .Please feel to contribute in updating this EA and stating on the EA the improvements coded .Please feel free to write down the set of rules as to how to use this E A.

It is useful and can be used with a poorly written EA as slave and master.

The purpose of the EA is to override all the stops and take profits etc .It is not tested yet and I will let all the testers contribute with their testing.Please post if the E A is functioning properly and what else needs to be coded and any missing codes.

If more than one EA is used ,say for example 5 .it will override the instructions on all.

Post my mistakes and I will correct them.

I have attached the modified ea and master. You need to place the
master on one chart first and then the slave on another chart. The magic
number does not matter. If there are any problems with it please let me
know.

To make a slave and master you need to do the following.

Create a master ea that creates and maintains global variables using
commands like the following :GlobalVariableSet("TradingAllowed",false);
please note.....global variables only save as numbers so false shows as
0 and true as 1

You then get the slave to check the values of the global variables
before making a trade....eg.
if(GlobalVariableGet("TradingAllowed")==1)opentrad e();
or if(TotalSellOrders()< GlobalVariableGet("Max_Shorts")) SellOrdOpen();

You should be able to adapt all your ea's to this master as I have not
made the master exclusively look for this slave;

Below is an explanation of some of the new variables I have used.

On the slave there is the option OrderSet, this is so you can select
which sl and tp strategy the ea trades.

On the master if a value is set to 0 this function will not be used.

extern int TradeHours =24;
extern int MaxAllowedTrades=5;
If more than 5 orders are opened within 24 hours the ea will disable trades

extern int DailyAccountLossAllowed=5;
If the account looses more than 5% in 24hours it will dissable trading;

extern int DeletePendingAfter =1; if any pending order is open for more
than 1 hour it is deleted

extern int CloseOrdersOnFridayAt=16; the hour on friday that all open
orders will be closed

extern int WeekendDissable=16; the hour on friday that new orders will
be dissalowed at
extern int WeekendEnable=10; the hour on monday that new orders will be
allowed again at
extern int NewsDissable=16;
extern int NewsEnable=10;



Best Regards

OILFXPRO
Attached Files
File Type: mq4 OILFXPRO SLAVE MASTER EA.mq4 (10.7 KB, 48 views)
Sponsored Links Profitable Forex Systems
Automatically trade proven forex trading systems.
Real trading records available!
__________________
pro-expert-advisors,com
Reply With Quote
  #2 (permalink)  
Old 12-07-2007, 06:44 AM
oilfxpro's Avatar
Forex Warrior
 
Join Date: Nov 2007
Posts: 285
Thanks: 9
Thanked 16 Times in 12 Posts
oilfxpro is on a distinguished road
Default

Hi

There were many other functions I expected to be included in this EA .There is room for improvement and additional coding

ea saves and maintains a file on the

>> computer which will contain instructions /do's and don't for all slaves.

>> I will code the slave to consult this file before making any trade.

>>> 1)The master will be created with maximum emphasis on safety and

>>> security.The master will monitor all orders sent and prevent duplicate

>>> orders and multiple orders created by ordersend functions.The master

>>> will log all orders sent and wait 10 mins before resending order. And

>>> before resending it will check orders filled and open positions , it

>>> will do the same everytime the metatrader programme reboots and will

>>> never allow orders above the maximum to be sent.

>>>

>>> 2)Sometimes, when several EAs start trading at the same time, trading

>>> functions may fail because the trading context is busy and only one EA

>>> is allowed to trade at the moment. So, other EAs will not open

>>> positions/modify orders etc. and the signal will be missed. To avoid

>>> this, you can either use WaitUntilTradingIsAllowed() function or

>>> StartTrading()/StopTrading() functions.We only had one EA.Please take

>>> care of this.

>>>

>>> 3)Your code will ensure the EA performs robustly and EA is coded to

>>> deal with situations where MT > feed is interrupted in some way. For

>>> instance, many/most EA's take no > account of MT simply being closed

>>> down and restarted - one of the most > basic requirements - and lose

>>> all their trade stats....The master will also not allow duplicate

>>> trades created by requotes in times of high volatility

>>>

>>> 4)A lot of EAS are not able to deal with requotes and platforms

>>> freezing during high volatility.The order send functions often send

>>> multiiple orders whilst the platforms are frozen.Please advise how you

>>> will code this.

>>>

>>> 5)The master will override the functions of the slave on the following

>>> commands.
>>> extern int RangeDeviation = 1; // Allowable pips +/- offset for entries


>>>> b)If EA incurs losses of more than 1% of account size in a 24 hour

>>>>

>>>> period ,disable E A. If EA incurs losses of more than 3% of account

>>>>

>>>> size in a 72 hour period ,disable E A

>>>>

>>>> The EAS can place more than the desired number of trades .I was using

>>>> How can the order send function be tightened and the code improved to

>>>>

>>>> prevent more than the required number of orders being placed?

>>>> Should every order sent be checked on log and should resending should

>>>>

>>>> be frozen for 10 minutes and should resending only be valid only after

>>>>

>>>> checking filled orders(total open trades) show trade as not executed?

>>>>

>>>> A lot of EAS are not able to deal with requotes and platforms freezing

>>>>

>>>> during high volatility.The order send functions often send multiiple

>>>>

>>>> orders whilst the platforms are frozen





>>>>

>>>> * *

>>>>


>>>> *He also gave you a couple of advices: *

>>>>

>>>> * *

>>>>

>>>> * *

>>>>

>>>> * *

>>>>

>>>> *Sometimes in the source code (for example, in the CloseAllOrders

>>>>

>>>> function) the return value of the trading functions (OrderModify,

>>>>

>>>> OrderSend etc.) is not checked. So, if an error occurs, there will be

>>>>

>>>> no error messages in the log file and it could be difficult to

>>>>

>>>> understand why the trading operation has failed. *

>>>>

>>>> * *

>>>>

>>>> * *

>>>>

>>>> * *

>>>>

>>>> *Sometimes, when several EAs start trading at the same time, trading

>>>>

>>>> functions may fail because the trading context is busy and only one EA

>>>>

>>>> is allowed to trade at the moment. So, other EAs will not open

>>>>

>>>> positions/modify orders etc. and the signal will be missed. To avoid

>>>>

>>>> this, you can either use WaitUntilTradingIsAllowed() function or

>>>>

>>>> StartTrading()/StopTrading() functions. *

>>>>







__________________
__________________
pro-expert-advisors,com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Breakout system by OILFXPRO oilfxpro Trading Systems 19 05-08-2008 07:14 PM
Oil trading of oilfxpro oilfxpro Forex Journals 25 04-10-2008 12:01 PM
OILFXPRO earlybird E A el cid Trading Systems 4 02-22-2008 02:25 PM
OILFXPRO Expert Advisers for Oil and currencies oilfxpro Classified Ads 2 01-29-2008 12:00 PM
Calling Master Scorpion Donaldinvest MetaTrader and ZeroCode 2 08-02-2007 02:54 PM


All times are GMT. The time now is 07:58 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now