How to have an EA stop taking trades on some currency pairs and keep trading others?

To add comments, please log in or register
craftvfx
7
craftvfx  
I have and EA and it has been working great.  Recently I decided to add a few extra currency pairs for it to trade.  Turns out it's only ment to trade EUR/USD and USD/CHF and now its starting to make some bad trades.  I'm told I can't just manually stop the trades that are already opened,  it screws up the EA and the EA will try to competsat for it.  Now if I turn off "auto trade" button at the top, this will prevent any more trades to be place, but it will also not make any new trades on the pairs I want it to be trading. I want to have the two currency pairs EUR\USD and USD|CHF continue to trade but turn off the others from autotrading any more and to have it eventually close those open trades.  Is there a way to do this?  Would turning off the option in the Expert advisor,  "Allow live trading"  keep those charts from placing more trades?  Would the already open trades close on their own still by checking this option?  Thanks
Sergey Golubev
Moderator
106134
Sergey Golubev  

Would turning off the option in the Expert advisor,  "Allow live trading"  keep those charts from placing more trades?

Yes, but the EA will stop managing the open trades from stopped pairs.

Forum on trading, automated trading systems and testing trading strategies

Modified Metatrader

Sergey Golubev, 2016.08.03 09:38

Where to check autotrading:


and


If you attached EA to the chart and you see "smiling face" so it is fine with autotading (in most of the cases):


If EA's face is not smiling and not happy so you can check everything once again:


It was for MT4 but MT5 is same with this case.


Example, -

  • one trade is open for GBP/JPY by the EA,
  • you turned "Allow live trading" off on the EA attached to GBP/JPY chart,
  • and because of that - no new trades will be opened for GBP/JPY, and
  • EA will stop managing already opened trade for GBP/JPY so you shoul close the trades manually by yourself, or wait when the trade will be closed by itself by stop loss or take profit.
Basic Principles - Trading Operations - MetaTrader 5
Basic Principles - Trading Operations - MetaTrader 5
  • www.metatrader5.com
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
Eleni Anna Branou
Moderator
6646
Eleni Anna Branou  
craftvfx:
I have and EA and it has been working great.  Recently I decided to add a few extra currency pairs for it to trade.  Turns out it's only ment to trade EUR/USD and USD/CHF and now its starting to make some bad trades.  I'm told I can't just manually stop the trades that are already opened,  it screws up the EA and the EA will try to competsat for it.  Now if I turn off "auto trade" button at the top, this will prevent any more trades to be place, but it will also not make any new trades on the pairs I want it to be trading. I want to have the two currency pairs EUR\USD and USD|CHF continue to trade but turn off the others from autotrading any more and to have it eventually close those open trades.  Is there a way to do this?  Would turning off the option in the Expert advisor,  "Allow live trading"  keep those charts from placing more trades?  Would the already open trades close on their own still by checking this option?  Thanks

An EA trades either on the instruments that you attach it onto or on the instruments that you choose from its settings.

So in your case you either have to attach your EA on the right charts (of the pairs you want to trade) or you set it to trade the desired instuments only within its settings (if it had such option).

Marco vd Heijden
Moderator
8176
Marco vd Heijden  

The already open trades only close if the levels (TP&SL) are set otherwise you will manually have to close them at some point , which should not form any problem.

Also you have to be specific upon designing a EA code it or tell the coder that it will only be allowed to trade instruments that are in market watch.

So you can add and remove instruments from and to market watch for the EA to trade.

The code should be written well in order to support this.

To add comments, please log in or register