Hi folks. Have a problem with an EA I wrote and have been updating. Works well on FXCM in placing pending orders, but inconsistently on Pepperstone. Have Googled the crap out the error, but found nothing helpful. Error shows up during live trading but not picked up by Strategy Tester. Doing my head in, so to speak.
So, the EA places buy stop and sell stop pending orders above or below current price on close of a bar on a M1 or M5 chart. On the Pepperstone platform (ECN), some of the orders are successful , but most fail with the above error. STOPS LEVEL is 0, and I write out the entry price, bid or ask, stop and relevant order detail. Entry price is always on the correct side of the bid/ask for entry, so I just don't get what it is. Have compared placed and failed trades and nothing jumps out.
Here's a sample of the error msg for a failed order:
Error in addOrder BUY. Error code = 3 PP = 9911.0, Ask = 9908.5, SL = 9886.3, TP = 0.0, Lotsize = 1.00. Risk Pct = 1.00%.
Reaching out to see if anyone else had encountered the same error or could offer pointers or a sharp stick to the eye if it's obvious of what might be up.
Thanks so much for any suggestions.
So, the EA places buy stop and sell stop pending orders above or below current price on close of a bar on a M1 or M5 chart. On the Pepperstone platform (ECN), some of the orders are successful , but most fail with the above error. STOPS LEVEL is 0, and I write out the entry price, bid or ask, stop and relevant order detail. Entry price is always on the correct side of the bid/ask for entry, so I just don't get what it is. Have compared placed and failed trades and nothing jumps out.
Here's a sample of the error msg for a failed order:
Error in addOrder BUY. Error code = 3 PP = 9911.0, Ask = 9908.5, SL = 9886.3, TP = 0.0, Lotsize = 1.00. Risk Pct = 1.00%.
Reaching out to see if anyone else had encountered the same error or could offer pointers or a sharp stick to the eye if it's obvious of what might be up.
Thanks so much for any suggestions.