|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Please help !!!
Hi,
I'm writing the simplest code I can but I always get error "Invalid price" when tring opening a position !!! ex: Code:
if (OrdersTotal() == 1) return;
res=OrderSend(Symbol(),OP_SELL,Lots, Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,"",100,0,Red);
if(res<0)
{
Print("OrderSend SELL failed with error: ",GetLastError());
}
And always, for all symbols, I get error 129 !!! Why ??? |
|
||||
|
I used this code in Volume Trader:
Code:
if ( Volume[1] < Volume[2] )
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,cm,EAMagic,0,White);
}
if ( Volume[1] > Volume[2] )
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,cm,EAMagic,0,Red);
}
Your problems seems to be related to stoploss and take profit. Try with 0 and if it works, try modifying TakeProfit and StopLoss ... and ... try to show them with an Alert (perhaps value is wrong). Last edited by forexts : 11-11-2005 at 11:22 AM. |
|
|||
|
I had the same problem with Brainwashing EAs all the day yesterday:
- Brainwashing #1c USDCHF,M15: Error opening order : invalid price. Now I know that it might be the following: - price is moving too fast - slippage. (yesterday especially); - MT4 build 185 have a bug (big one!). I uploaded MetaTrader to build 186 and everything is ok now. Yaniv_av, I think you are using MetaTrader build 184 or 185. |