different behaviour of the same EA at 2 different brokers

 

Hi,

the problem I would like to ask it might be alredy solved here. I am new here. The problem is that I have an EA that works fine on one broker but failed to work right on another. The EA put 1 pending order in its initial concept but with my new broker it put hundreds of pending orders at once. The broker doesn't know what the problem is. Can somebody tell me what can I do ?

Thank you,

Ovidiu

 
racorean69:
Can somebody tell me what can I do ?
Fix your code.
 
The code logic is good. It works fine on my old broker. At my new broker ...well is not. The code puts one pending order around some price value. At the new broker it puts dozens of pending orders insteed of one. I cannot figure out why ? Do you have any idea of what should I change in the code ?
 
racorean69:
Do you have any idea of what should I change in the code ?

Yes, make it work correctly.

Does you code handle both 4 and 5 digit Brokers ?

Does your code handle ECN Brokers ?

Does you code make use of return values from functions, and check and report errors ?

 
racorean69:
The code logic is good. It works fine on my old broker. At my new broker ...well is not. The code puts one pending order around some price value. At the new broker it puts dozens of pending orders insteed of one. I cannot figure out why ? Do you have any idea of what should I change in the code ?

No it's not, or it would be working. Don't be arrogant.

Check what Raptor said. Do you have hard coded numbers like minLot, etc.

Otherwise, since there are no mind readers here, post YOUR code.

 

Thank you, for your advices and for your time.

 
racorean69:

Thank you, for your advices and for your time.

Did you fix it ? what was the issue in the end ?
 

Not yet. I'm still working. The problem is that in backtesting it works fine but in real trading problems appear. So I have to correct the code by testing it in real trades. It will take some time.

The problem is in managing open positions, I guess. It looks like the code did not recognize when a pending order became a market order. Cause in this situation it should stop put other pending order but...it still add pending orders.

Thanks for asking ! Regards.