I hired someone to build an EA and then it performs as per the logic the in strategy tester buy sometimes not in the DEMO. I have a doubt in following codes and I don't know why he needs to define "testing" especially since it should work same in testing, demo and real. Please, can anyone help me to understand this?
//| Expert initialization function |
//+------------------------------------------------------------------+
void OnInit()
{
sh = BarShift;ArrayResize(text,26);
if(MarketInfo(Symbol(),MODE_LOTSTEP)==1) lotdigit=0;
if(MarketInfo(Symbol(),MODE_LOTSTEP)==0.1) lotdigit=1;
if(MarketInfo(Symbol(),MODE_LOTSTEP)==0.01) lotdigit=2;
Hi Tham,
Please copy the code and paste to SRC
Hello !
Please explain in more detail
Hi Tham,
Please copy the code and paste to SRC
Attached the EA
Hello !
Please explain in more detail
The EA doesn't work in the same way like it works in testing mode. Missing many opportunities in the demo. I want to know that is because of the coding. Specially what is the purpose of having this "
(!IsTesting())
I hired someone to build an EA and then it performs as per the logic the in strategy tester but sometimes not works same way in the DEMO. I have a doubt in following codes and I don't know why he needs to define "testing" especially since it should work same in testing, demo and real. Please, can anyone help me to understand this?
The attached code does not contain anything suspicious in regard to IsTesting() function. If you observe differences only sometimes, you need to find another reason for this. If conditions with IsTesting could negatively affect trading in the tester, then it would happen regularly.
The attached code does not contain anything suspicious in regard to IsTesting() function. If you observe differences only sometimes, you need to find another reason for this. If conditions with IsTesting could negatively affect trading in the tester, then it would happen regularly.
Thank you
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I hired someone to build an EA and then it performs as per the logic the in strategy tester but sometimes not works same way in the DEMO. I have a doubt in following codes and I don't know why he needs to define "testing" especially since it should work same in testing, demo and real. Please, can anyone help me to understand this?