Try refreshing the price before ordersend.
|
gangsta1:
For some reason if the minute is set to 0, the trade gives an "OrderSend() error - invalid price" error on Alpari UK.
For some reason if the minute is set to 0, the trade gives an "OrderSend() error - invalid price" error on Alpari UK.
- If you are looping instead of returning from start, you must RefreshRates() after the sleep.
- Otherwise, post the OrderSend code.
Thanks for the replies guys.
I found a work-around solution. The hour is called from the broker server and the minute from the local time, which allows the trade to execute at 0 minutes on Alpari UK.
Not ideal, but I believe it is more of a broker error as it does not happen on my other brokers.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My EA trades at a set time.
For some reason if the minute is set to 0, the trade gives an "OrderSend() error - invalid price" error on Alpari UK. There is no number reference for the error such as 129.
It trades fine on other brokers when the minute is set to 0. I do have a slippage filter, but even with that set to 999 the trade will not be placed on the hour.
The trade is triggered on the hour during back testing aswell. It's almost as if the broker does not want me to trade at that time!
I am specifying to buy at the ask and it works fine on a few other brokers that I have tested, just not on Alpari UK when the minute is set to 0?
I have just got a trade timeout error whilst testing it the past hour. It's a pain because to test it live I have to wait every hour.