collapse

Author Topic: EA Controller  (Read 162260 times)

Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #300 on: October 30, 2018, 10:16:59 AM »
Yes you are right. With third party EAs, which have not been modified with the signal code, we would have to resort to using the FX Blue Trade Copier.

But one could do the copying on the same MT4 platform. Run the 0.01 lot version of the EA with the Controller linked to the Trade Copier Sender, and copy with 10x lot size to the Trade Copier Receiver also located on that same MT4.

The other alternative is to link the Controller for the monitoring EA to the DIY Trade Manager Plus (which has the signal code) to kill off unwanted trading with a 1 or 2 pip SL on the live account.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #301 on: October 30, 2018, 10:45:35 AM »
If you can't have the perfect performance curve...

We would all like our EAs to exhibit the perfect performance curve rising up from bottom left to top right, inexorably, with maybe a few small dips.

But if we can't get that, the next best thing in my view is to get the sort of curve that the BB set file (magic 567893) is experiencing. One with clearly defined sets of up and down trends as shown below.

With that type of performance, we can clearly see that having the Controller switch off the EA on the live account when performance begins to plummet, and restarting when performance picks up again, would have saved us some $300 in potential losses.

Unfortunately, this PZ BB EA with TM-based exits, which I can replicate with the Autotrader, is still on my development test bed account, and so I cannot show any linked "live" results. But by the end of this week I will commence trading this EA and several other new ones on my indefinite demo account linked to a new live account. So by December we should be in a position to run a myfxbook and FX Blue monitor on the new live account for all interested parties to follow.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online FLechdrop

  • DonbonsPrivateGroup
  • Sr. Member
  • *
  • Posts: 603
Re: EA Controller
« Reply #302 on: October 30, 2018, 01:32:12 PM »
Yes you are right. With third party EAs, which have not been modified with the signal code, we would have to resort to using the FX Blue Trade Copier.

But one could do the copying on the same MT4 platform. Run the 0.01 lot version of the EA with the Controller linked to the Trade Copier Sender, and copy with 10x lot size to the Trade Copier Receiver also located on that same MT4.

OK, that sounds slightly better already. Can you trade lot sizes determined by a percentage of your account?

Quote
The other alternative is to link the Controller for the monitoring EA to the DIY Trade Manager Plus (which has the signal code) to kill off unwanted trading with a 1 or 2 pip SL on the live account.

What would be the benefit of that?

Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #303 on: October 31, 2018, 03:10:44 AM »
Yes you are right. With third party EAs, which have not been modified with the signal code, we would have to resort to using the FX Blue Trade Copier.

But one could do the copying on the same MT4 platform. Run the 0.01 lot version of the EA with the Controller linked to the Trade Copier Sender, and copy with 10x lot size to the Trade Copier Receiver also located on that same MT4.

OK, that sounds slightly better already. Can you trade lot sizes determined by a percentage of your account?

Quote
The other alternative is to link the Controller for the monitoring EA to the DIY Trade Manager Plus (which has the signal code) to kill off unwanted trading with a 1 or 2 pip SL on the live account.

What would be the benefit of that?

I'll do a separate Post to describe the various options of using the Controller with third party EAs. But in answer to your questions:

1. Yes you can. As described in the User Guide at https://www.fxblue.com/appstore/u2/mt4-personal-trade-copier/user-guide#toc3.4.4

"3.4.5Lot sizing based on maximum cash risk

You can configure the receiver to risk a specific cash amount, or a percentage of your account, using the CashRiskFixed, CashRiskEquityPercent, or CashRiskBalancePercent parameter (and turning off the other modes).

CashRiskFixed: specifies a fixed cash amount to risk per trade, e.g. $100

CashRiskEquityPercent: specifies a percentage of your account equity to risk, e.g. 2.5%

CashRiskBalancePercent: specifies a percentage of your account equity to risk, e.g. 2.5%

In order to use any of these settings, you must also use the FixedSLPips parameter to set a stop-loss on each trade."

2. When using the TM this way the idea is to run the EA on both the demo account and the live account non-stop. Place the Controller with the EA on the demo account, and the TM on the live account. When the demo EA goes into DD, it will signal the TM on the live account to close the position at 1 or 2 pip SL; effectively stopping the live EA from trading; ie only a 1 pip loss instead of the normal say 50 pips loss when the market is unfavourable.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #304 on: October 31, 2018, 05:26:28 AM »
Using the Controller with Third Party EAs

(Third party EAs are EAs that do not have the signal code and hence cannot be controlled directly by the Controller.)

There are three ways in which you can use the EA Controller with Third Party EAs. The descriptions below are for running one copy of the EA on a demo account, the so-called monitoring EA, together with the Controller to determine when the EA is running profitably and when it is in DD. The three options are:

1. Place the third party EA , the Controller and the FX Blue Trade Copier Sender on the demo account and link this Copier Sender to the Controller. Place the FX Blue Trade Copier Receiver on the live account. When the EA on the demo is running profitably, the Controller will activate the Sender to copy the trades to the Receiver on the live account. When the demo EA goes into DD, the Controller will deactivate the Sender so that trades will not be copied to the live account.

2. Place the third party EA and the Controller on the demo account and place the DIY Trade Manager Plus on the live account; and link the Controller on demo to the TM on live. Set the TM to scale-in trades on the live account when the demo EA is at 1 or 2 pips in profit and set Close on Main to true for the scale-ins. So when the demo EA is running profitably, the Controller will signal the TM to scale-in trades on the live account; these trades will be closed (in profit or loss) when the demo EA trades are closed. When the demo EA goes into DD, the TM will be prevented from placing scale-in trades on the live account.

3. Place the third party EA and the Controller on the demo account and place a second copy of the third party EA, and the DIY Trade Manager Plus on the live account.; link the Controller on the demo to the TM on the live account. Set the TM to close trades at 1 or 2 pips in loss. When the demo EA is running profitably, the Controller will deactivate the TM and so the third party EA on the live account will trade as normal. When the demo EA goes into DD, the Controller will activate the TM so that any trades that are opened on the live account will be closed at 1 or 2 pips in loss. So we sustain very small losses rather than the normal larger losses during unfavourable market conditions.

You can do the same options by placing everything on the one live account, running the "monitoring" EA which will run all the time at 0.01 lot and the "live" EA at some higher lot size. The "live" EA will only trade during favourable market conditions and we want the profits from this to outweigh any losses from running the "Monitoring" EA. Hence the different lot sizing requirement.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online FLechdrop

  • DonbonsPrivateGroup
  • Sr. Member
  • *
  • Posts: 603
Re: EA Controller
« Reply #305 on: October 31, 2018, 12:14:39 PM »
Great! Thanks for all this.

Do you have any idea about differences in delay and/or pips for the various options?

Offline taipan888

  • Jr. Member
  • **
  • Posts: 34
Re: EA Controller
« Reply #306 on: October 31, 2018, 01:35:45 PM »
Using the Controller with Third Party EAs

(Third party EAs are EAs that do not have the signal code and hence cannot be controlled directly by the Controller.)

There are three ways in which you can use the EA Controller with Third Party EAs. The descriptions below are for running one copy of the EA on a demo account, the so-called monitoring EA, together with the Controller to determine when the EA is running profitably and when it is in DD. The three options are:

1. Place the third party EA , the Controller and the FX Blue Trade Copier Sender on the demo account and link this Copier Sender to the Controller. Place the FX Blue Trade Copier Receiver on the live account. When the EA on the demo is running profitably, the Controller will activate the Sender to copy the trades to the Receiver on the live account. When the demo EA goes into DD, the Controller will deactivate the Sender so that trades will not be copied to the live account.

2. Place the third party EA and the Controller on the demo account and place the DIY Trade Manager Plus on the live account; and link the Controller on demo to the TM on live. Set the TM to scale-in trades on the live account when the demo EA is at 1 or 2 pips in profit and set Close on Main to true for the scale-ins. So when the demo EA is running profitably, the Controller will signal the TM to scale-in trades on the live account; these trades will be closed (in profit or loss) when the demo EA trades are closed. When the demo EA goes into DD, the TM will be prevented from placing scale-in trades on the live account.

3. Place the third party EA and the Controller on the demo account and place a second copy of the third party EA, and the DIY Trade Manager Plus on the live account.; link the Controller on the demo to the TM on the live account. Set the TM to close trades at 1 or 2 pips in loss. When the demo EA is running profitably, the Controller will deactivate the TM and so the third party EA on the live account will trade as normal. When the demo EA goes into DD, the Controller will activate the TM so that any trades that are opened on the live account will be closed at 1 or 2 pips in loss. So we sustain very small losses rather than the normal larger losses during unfavourable market conditions.

You can do the same options by placing everything on the one live account, running the "monitoring" EA which will run all the time at 0.01 lot and the "live" EA at some higher lot size. The "live" EA will only trade during favourable market conditions and we want the profits from this to outweigh any losses from running the "Monitoring" EA. Hence the different lot sizing requirement.

An interesting tool! But, I would like to know if it is possible to do this control on the symbol basis, not on the entire account basis. For example, if EURUSD demo is in DD, only EURUSD live is deactivated. All other charts of the live account are still active.

Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #307 on: October 31, 2018, 11:03:26 PM »
Great! Thanks for all this.

Do you have any idea about differences in delay and/or pips for the various options?

To be honest I have never checked this. But all three methods rely on the use of the FXBlue QuickChannel technology
https://www.fxblue.com/appstore/9/quickchannel

As the developers say, "QuickChannel can deliver messages in less than 1 millisecond, without the EA/script having to run in an infinite loop or use large amounts of processor power. "
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #308 on: October 31, 2018, 11:05:31 PM »
To the question:

"An interesting tool! But, I would like to know if it is possible to do this control on the symbol basis, not on the entire account basis. For example, if EURUSD demo is in DD, only EURUSD live is deactivated. All other charts of the live account are still active."

Yes, the Controller is EA/Magic number specific. If you are running several EAs, you would use a Controller for each.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Offline taipan888

  • Jr. Member
  • **
  • Posts: 34
Re: EA Controller
« Reply #309 on: November 01, 2018, 08:17:49 AM »
To the question:

"An interesting tool! But, I would like to know if it is possible to do this control on the symbol basis, not on the entire account basis. For example, if EURUSD demo is in DD, only EURUSD live is deactivated. All other charts of the live account are still active."

Yes, the Controller is EA/Magic number specific. If you are running several EAs, you would use a Controller for each.
You seem not having understood my question really. My question was if I attach the same EA with the same magic number to different currency pairs, can the control be done for each currency pair individuelly?

Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #310 on: November 01, 2018, 09:15:08 AM »
To the question:

"An interesting tool! But, I would like to know if it is possible to do this control on the symbol basis, not on the entire account basis. For example, if EURUSD demo is in DD, only EURUSD live is deactivated. All other charts of the live account are still active."

Yes, the Controller is EA/Magic number specific. If you are running several EAs, you would use a Controller for each.
You seem not having understood my question really. My question was if I attach the same EA with the same magic number to different currency pairs, can the control be done for each currency pair individuelly?

Sorry, misunderstood. No, with the current version of the Controller. It is magic number specific and currency pair agnostic. An earlier version was currency pair specific for the magic number, and could be resurrected.

However, I am not sure why one would not want to just make a minor change to the magic number of the EA for use on different currency pairs. In my view having the same magic number for EAs running on different currency pairs concurrently is a practice that could lead to conflict within MT4 as it handles multiple trades - presumably the strategy settings for each pair are somewhat different. Of course if the EA developer has hidden the magic number it would be impossible to change; but why would he do that?

I also have a version of the Controller that uses the Trade Comment rather than the magic number. So if the Trade Comment field was accessible in the EA Properties Input, then this would be another solution in your case.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #311 on: November 02, 2018, 02:02:16 AM »
Using the Controller with Third Party EAs

(Third party EAs are EAs that do not have the signal code and hence cannot be controlled directly by the Controller.)

There are three ways in which you can use the EA Controller with Third Party EAs. The descriptions below are for running one copy of the EA on a demo account, the so-called monitoring EA, together with the Controller to determine when the EA is running profitably and when it is in DD. The three options are:

1. Place the third party EA , the Controller and the FX Blue Trade Copier Sender on the demo account and link this Copier Sender to the Controller. Place the FX Blue Trade Copier Receiver on the live account. When the EA on the demo is running profitably, the Controller will activate the Sender to copy the trades to the Receiver on the live account. When the demo EA goes into DD, the Controller will deactivate the Sender so that trades will not be copied to the live account.

2. Place the third party EA and the Controller on the demo account and place the DIY Trade Manager Plus on the live account; and link the Controller on demo to the TM on live. Set the TM to scale-in trades on the live account when the demo EA is at 1 or 2 pips in profit and set Close on Main to true for the scale-ins. So when the demo EA is running profitably, the Controller will signal the TM to scale-in trades on the live account; these trades will be closed (in profit or loss) when the demo EA trades are closed. When the demo EA goes into DD, the TM will be prevented from placing scale-in trades on the live account.

3. Place the third party EA and the Controller on the demo account and place a second copy of the third party EA, and the DIY Trade Manager Plus on the live account.; link the Controller on the demo to the TM on the live account. Set the TM to close trades at 1 or 2 pips in loss. When the demo EA is running profitably, the Controller will deactivate the TM and so the third party EA on the live account will trade as normal. When the demo EA goes into DD, the Controller will activate the TM so that any trades that are opened on the live account will be closed at 1 or 2 pips in loss. So we sustain very small losses rather than the normal larger losses during unfavourable market conditions.

You can do the same options by placing everything on the one live account, running the "monitoring" EA which will run all the time at 0.01 lot and the "live" EA at some higher lot size. The "live" EA will only trade during favourable market conditions and we want the profits from this to outweigh any losses from running the "Monitoring" EA. Hence the different lot sizing requirement.

Doing it all on a Live account

With the sort of trading I do I don't notice much difference between demo and live accounts with AxiTrader so the mothods described above can be used. But of course demo and live accounts are different.

So here would be an alternative way of using the Controller (either MA or PF version) with third party EAs. The example below is for using with the PF version of the Controller.

Load the EA onto the live account and add two copies of the Controller to the chart. Also load two copies of the DIY Trade Manager Plus on the live account; set them to operate in scale-in mode and link each to one of the Controllers.

The EA will run all the time with whatever lot size you choose.
Controller 1 will be set to add a normal scale-in of whatever size you choose at say 2 pips in profit whenever the pf is above 1.4.
Controller 2 will be set to add a reverse scale-in of the same lot size as the EA at say -2 pips in loss whenever the pf is below 1.0
(in both cases the scale-ins will be set to close whenever the relevant EA's trade is closed).

So effectively we have increased lot size and hence increased risk, whenever the EA is performing well. (Favourable market conditions).
And we have virtually negated any losses from the EA (because of the reverse scale-ins) whenever the EA is losing as measured by the pf over 50 trades in this example. (Unfavourable market conditions).
 
When the EA's pf is between 1 and 1.2, only the EA will be trading and there will be no scale-ins.

This setup is demonstrated in the image below which is the data for the VFX EURJPY EA. You can see that we would have similar results using the MA version of the Controller, with closed P/L above/below its SMA 50 to trigger normal or reverse scale-ins, but a bit more chop.

We will lose a pip or 2 on each trade (the reverse scale-in is set to trigger at -2 pips but will close at the same time as the EA's trade) so if the DD is long we could increase the lot size of the reverse scale-in by say 20% and actually make a bit of money; until of course the performance starts to pick up again at which time we would want to reduce again. So still a bit of baby sitting required, but hopefully minimal.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #312 on: November 04, 2018, 09:01:08 AM »
An Example of Controlling with Scale-ins on the One Account

In the current Tests 4,5 and 6 we have been running the EA with magic 48164 since 18 Feb. The Controllers are adding scale-ins as per previous Post - normal scale-in (648164) when profitable and reverse scale-in (3948164) when in DD using the MA version of the Controller.

The EA finally moved into DD in October so we now have a performance record showing the results from running the EA continuously along with the scale-ins as determined by market conditions. So all trading on the one account, in this case a demo account.

The data is shown in the image.

1. If we had only run the EA, profit would have been $413; but with the addition of the two types of scale-ins we have made an extra $190 profit.

2. The reverse scale-in did not add much at all, but think what would have happened if the DD had been operating for longer. So reverse scale-ins during DD are really a safety measure; they may yield little if the market is favourable for most of the time. But they could negate significant losses should the market remain unfavourable for any long periods. (It looks like we are about to move out of DD.)

3. Out of interest, the bottom chart is where the Controller has been set to monitor, and take action, based on the sum of magics 48164 and 648164, ie the EA trades plus the normal scale-ins. In that case we would have stopped trading the (losing) normal scale-ins earlier and so we would be at a higher profit. But it might take a few more trades for closed P/L (the red line) to move back above the SMA 20 (blue line) as is evident when you compare the two bottom charts.
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #313 on: November 13, 2018, 06:22:33 AM »
Using Multiple Controllers to Assess Conditions

The risk of getting whipsawed with the Controller is real and needs to be dealt with as pointed out elsewhere by Flechdrop and others. Because that can actually lead to greater losses than not controlling at all.

So I looked at some longer term trading data that I had for one of my test strategies on USDCHF - just over two years.

I then applied the Controller MA, period 20 and two copies of the Controller PF, periods 20 and 80.

This is shown in the image, and may be a bit confusing so let me explain:

1. The Controller MA is useful since it shows the closed P/L, as well as providing a controlling trigger of course with the MA. The orangy shading however shows the periods of whipsaw we would have if we had relied on that Controller alone.  So not a good idea for these types of performance curves. Although we would at least have not been trading live for most of the red shaded area. And also with Controller PF period 20 (middle chart) if we had set Level to 1 - again an orangy shaded area highlighting whipsaw.

2. But if we had used Controller PF Period 80 (bottom chart) in combination with the other two, we may well have decided to let the EA trade on live during the period shaded in green, including the whipsawing period shown on the top two charts - for a gain of some 180 pips. I can't yet think of how we would fully automate that with three Controllers but there is nothing stopping us (apart from laziness or lack of time) to add multiple versions of the Controller with different settings as I have done here. We can activate/deactivate a Controller at will so we can just use one or all versions purely as a visual check for manual intervention.

What we are really doing with this sort of approach is to get a better assessment of when to pull the plug on an EA and when it might be worthwhile, and reasonably safe, to let it run through some chop in performance.
« Last Edit: November 13, 2018, 06:33:54 AM by diyforexskills »
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




Online diyforexskills

  • Verified Vendor
  • Sr. Member
  • ***
  • Posts: 1232
Re: EA Controller
« Reply #314 on: November 13, 2018, 11:06:48 AM »
Price or Performance?

A quick glance at the image below might suggest that it is a price chart with weekly candles.

But it is not. It is actually the weekly cumulative performance graph of FXAE 482310 on a demo account trading continuously, the same one as in previous Post.

Funny how such a performance graph can be described in terms of downtrend and uptrend and ranging. And we even have a double bottom! Just like the patterns we get on price charts.

So what we are trying to achieve with the EA Controller is to enter live trading on uptrend (favourable market conditions), exit live trading on downtrend (market dynamics no longer suitable for the strategy), and be very circumspect about trading live during ranging conditions (market dynamics in transition). Using several versions/settings of the Controller as described in previous Post can help with that. And I think there are ways of using the Z-score feature of the Controller to provide further help in a way that I had not envisaged before. More on that later.

Visual inspection of these types of performance graphs and manual adjustment, are of course another option. Humans are not totally redundant as yet!  :)
Information and product page - http://www.diyforexskills.com/forex-tools/

Live trading accounts
https://www.fxblue.com/users/sydap2003axilive (FXAE Bollinger Band EAs)
https://www.fxblue.com/users/sydapaxilivepro (Magic Wand Trading) Not trading with this at the moment.




 

browse forum

* Recent Posts

Re: Darwins by petersurrey
[Today at 09:39:47 AM]


Re: Forex Manager DBA by petersurrey
[Today at 09:36:58 AM]


Re: Q&A Broker rebates and discounts by HFT Group
[Today at 08:45:04 AM]


Re: Bitcoin Discussion by oportunis
[Today at 08:33:21 AM]


Re: Q&A Broker rebates and discounts by guptil
[Today at 07:06:37 AM]


Re: The Main reason Why Forex Traders Fails. by joss98
[Today at 04:01:27 AM]


Re: Forex Fury by phunter33
[Yesterday at 10:59:06 PM]


Re: Bitcoin Discussion by Humble Trader's Fx
[Yesterday at 10:39:08 PM]


Re: Bitcoin Discussion by gpfwestie
[Yesterday at 10:35:17 PM]


Re: Bitcoin Discussion by Humble Trader's Fx
[Yesterday at 10:17:47 PM]