Invalid Stops - issue

 

When I try to run an EA in the back testing, it works perfectly but some orders are not getting executed due to invalid stops, when the EA tries to modified the SL/TP sometimes it gets error of invalid stops.  I am running this EA on Custom Symbol.....


Is there anyway to avoid this issue of Invalid Stops?


Do I have to change any Parameters in the Custom Symbol Settings?


Please advise me

 
Thangamani Muthusamy:

Is there anyway to avoid this issue of Invalid Stops?

Do I have to change any Parameters in the Custom Symbol Settings?

You don't know what's wrong, so you are guessing. Stop guessing and find out what is wrong. Only then can you answer your questions.

Use the debugger or print out your variables, including _LastError and prices and find out why.

 
whroeder1:

You don't know what's wrong, so you are guessing. Stop guessing and find out what is wrong. Only then can you answer your questions.

Use the debugger or print out your variables, including _LastError and prices and find out why.

Thank you for your reply.....I do not know technically how to run this LastError....


is there any other way to overcome this probelm?


Shall I share the EA with you?

 
  1. Print(_LastError);
  2. Comment(_LastError);
  3. Walk through your EA with the Debugger and hist. Quotes and put _LastError on top of all other variables you want to watch.
Bu I suggest you to print all the arguments of the order in case of an error incl. the error number with _LastError.
 
Thangamani Muthusamy: .I do not know technically how to run this LastError.... is there any other way to overcome this probelm?

Click the links and learn or pay someone. You don't know what the problem is, you must find out.