"No Trading Operations" Problem - Who can solve this issue forever?! - page 2

 
I had this problem a few minutes ago, and for me the default input settings of my filters/indicators were too strict to generate trades from all the test currency pairs. Once I lowered the default input settings, the program validated.
 
Keith Watford:

It would be nice if you explained how you solved it as others may have the same problem in future and your experience may help them.

Mehrdad Jeddi:
OK,Good,what was the problem?

I applied major modifications on calculating the lot size and checking the allowed size before OrderSend() based on these modifications. Actually, there was lots of changes. I believe other developers should focus on their own codes to find a solution for their method of programming.

 
Pezhman Zamani:

I applied major modifications on calculating the lot size and checking the allowed size before OrderSend() based on these modifications. Actually, there was lots of changes. I believe other developers should focus on their own codes to find a solution for their method of programming.

This saved me a lot of time. Thank you dear!!!!

 
Can someone help me on this please. What kind of modification have you done and manage to upload the file successfully.

Mind to share the specific code? 

Thank you. 
 
i think nobody want to share proper solution when he get solution. i hope anybody help us to share a dummy code to solve this issue.
 
Ali Raza #:
i think nobody want to share proper solution when he get solution. i hope anybody help us to share a dummy code to solve this issue.

I solved mine by checking minimum lot allowed and assign it to the calcukated Lots if it's greater than the calculated lot

 
Pezhman Zamani #:

I applied major modifications on calculating the lot size and checking the allowed size before OrderSend() based on these modifications. Actually, there was lots of changes. I believe other developers should focus on their own codes to find a solution for their method of programming.

Just follow this it helped me.

 

You need to check the lot size first before doing an order. Just use this code to return the correct lot size. I hope it will help your problem.

double checkLotSize(double value){
  double maxVolume  = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX);
  double minVolume  = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);
  double volumeStep = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
  int ratio         = (int) MathRound(value/volumeStep);
  value = value > maxVolume ? maxVolume : (value < minVolume ? minVolume: ( MathAbs(ratio*volumeStep - value) > 0.0000001 ? ratio * volumeStep : value ));
  return NormalizeDouble(value, 2);
}
 
Pezhman Zamani #:
 Thanks to all, I solved it.

I have the same problem Sir. How did you solve it?

 
Try uploading the file after some time. This solves the error sometimes.
Reason: