OP_SELLLIMIT not processing

 

i have a program statement that places an OP_SELLLIMIT.

It is being accepted as an order with no errors, but when the price target is hit, the order just disappears from the screen.

Never does show up as a 'sell' order.

tia,

Keith

Sell_ticket=OrderSend(Symbol(),OP_SELLLIMIT,Lots,SellAt,3,0,0,"",MAGICMA,0,Red);

 

This string is good. Something wrong in your code.

Could you show us the whole code?

 
Roger wrote >>

This string is good. Something wrong in your code.

Could you show us the whole code?

 
After
Sell_ticket=..
Put
if(Sell_ticket<0)Print("Error Sell - ",GetLastError());
and check your Experts and Journal logs. I suppose you have orders prices too close to real price.
 
Roger wrote >>
After
Sell_ticket=..
Put
if(Sell_ticket<0)Print("Error Sell - ",GetLastError());
and check your Experts and Journal logs. I suppose you have orders prices too close to real price.

No, dont think so. the Limit order is being accepted, no stop loss, take profit is 10pips. just when the moving price hits my sell/buy limit it just disappears with no error code generated.

take profit is 10 away from the limit entry price.

 
Do you have enough money?
 
Roger wrote >>
Do you have enough money?

humm, thought i did. would that not give an error when the limit order was placed?

well open another demo account with lots of money and see.

-----------------------------------------------------------------------

stupid me. should have tried to open an order in the first place.

that seems to be what is wrong, as i could not open a market order. told me not enough money.

thanks Roger, do not know how long it would have taken me to figure that out.

 
Comments that do not relate to this topic, have been moved to "Off-topic MT4/mql4 questions.".
 
enigmatrader: i have a program statement that places an OP_SELLLIMIT.

There is no need to create pending orders in code.

  1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)

    Don't worry about it unless you're scalping M1 or trading news.

  2. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

 
William Roeder # :

No es necesario crear órdenes pendientes en el código.

  1. El pendiente tiene una ligera ventaja: A) estás más cerca de la parte superior de la cola (se llena más rápido), B) no hay demora en la red de ida y vuelta (se llena más rápido).

    No se preocupe a menos que esté reventando M1 o negociando noticias.

  2. Los humanos no pueden mirar la pantalla las 24 horas del día, los 7 días de la semana, por lo que usan órdenes pendientes; Los EA pueden, por lo que no hay necesidad de órdenes pendientes, esperar hasta que el mercado alcance el precio de activación y simplemente abrir una orden.

william roder I need your help, I need your help I need to contact you
Reason: