Is there any possibility to remove the true/false parameter? So that it makes a decision to open a Buy or Sell position only on the basis of the MA position
I suggest this variant: instead of true/false I will insert an enumeration
//+------------------------------------------------------------------+ //| Enum Trade| //+------------------------------------------------------------------+ enum ENUM_TRADE { buy=0, // only Buy sell=1, // only Sell buy_and_sell=2,// Buy and Sell };
so it will be possible to choose three trading options
- only Buy
- only Sell
- and Buy and Sell.
Just what the doctor ordered)))
Please wait for the publication of version 2.002 (the code will be changed to version 2.002 after verification).
Please wait for the publication of version 2.002 (the code will be changed to version 2.002 after verification).
I stopped opening trades. Although in the strategy tester everything shows perfectly and strictly in time. Do you know what can be the problem?
First of all, check the "Journal" tab of the terminal - are there no messages there?
First of all, check the "Log" tab of the terminal - are there no messages there?
I checked the first thing, there are no errors. I think I figured it out - when installing the robot on the chart in the field where the volume is specified, it is necessary to specify a number with a dot, even if the lot is whole (i.e. "1.0").
I checked the first thing, no errors. I think I figured it out - when installing the robot on the chart, in the field where the volume is specified, it is necessary to specify a number with a dot, even if the lot is whole (i.e. "1.0")
If you specify the wrong volume, there will be an error in OnInit() and the Expert Advisor will be unloaded from the chart.
First of all, check the "Log" tab of the terminal - are there no messages there?
After all, it is not a matter of specifying the number of lots. In order for the robot to open a position, it is necessary to restart the terminal and switch on automatic trading again. But now there is another problem - it does not close the open position. There are no error messages in the log.
However, it is not a matter of specifying the number of lots. In order for the robot to open a position, it is necessary to restart the terminal and switch on automatic trading again. But now there is another problem - it does not close an open position. There are no error messages in the log.
Restarting is definitely unnecessary.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Opening and Сlosing on time v2:
Author: Vladimir Karputov