Vladimir, for the EA to buy and sell separately, do you need this code ?
//+------------------------------------------------------------------+//| Determines the expert's trading status. ||//+------------------------------------------------------------------+enum ENUM_TRADE_STATE
{
TRADE_BUY_AND_SELL, // Buying and selling allowed.
TRADE_BUY_ONLY, // Only purchases are allowed. Sales are prohibited.
TRADE_SELL_ONLY, // Sales only. Purchases are prohibited.
TRADE_STOP, // Trading is prohibited. Immediately close all positions. Do not accept new entry signals.
TRADE_WAIT, // Control over open positions is lost. New signals are ignored. Useful at the moment of news release.
TRADE_NO_NEW_ENTRY // Signals for entry are ignored. However, already opened positions are followed according to the trading logic.
};
If yes, please tell me after which line it should be inserted into the code.
Vladimir, I think I've figured it out. I added two lines:
I got this in your Expert Advisor:
Did I do it right?
Yes, you have inserted the input parameters correctly. Now you need to add the code to the places where positions are opened (to either allow or disallow).
Thanks, but in the optimisation window, some lines are red because of this ?
Yes, the red lines are rejected passes.
Yes, the red lines are rejected passes.
Thanks, I'll test it.
Vladimir, for the EA to buy and sell separately, do you need this code ?
If yes, please tell me after which line it should be inserted into the code.
Vladimir, I think I've figured it out. I added two lines:
I got this in your Expert Advisor:
Did I do it right?
Vladimir, I think I've figured it out. I added two lines:
I got this in your Expert Advisor:
Did I do it right?
Yes, you have inserted the input parameters correctly. Now you need to add the code to the places where positions are opened (to either allow or disallow).
Yes, you have inserted the input parameters correctly. Now we need to add code to the places where positions are opened (to either allow or disallow).
Add these lines wherever there is a Buy or Sell ?
Hi friends, I tested this EA but I have a hard time adjusting the Lot. How do I set Fixed Lot on this EA? Can you help me?
Use the"Lots" parameter