Good afternoon. Need help on a simple EA helper. I need an EA which opens 1 order in the chosen direction, the chosen lot at the formation of a new candle, respectively, given the time frame chart. Maybe someone has seen such an EA or can write one.
CJIeCaPb: ) but how do you determine this by code?
The price is there, the pending one at that price has disappeared, and the market one at that price has appeared. Also, sometimes a comment appears, something like "from ticket xxx", where xxx is the ticket number of the pending order.
P.S. The above is just a fragment of a half-empty EA I scribbled to track momentum.
This snippet works, it's fine.
Impulse is bad. :(
Hi!) How can I tell if a pending order has become a market order?
The question itself already has an answer
) but how do you determine this by code?
Help who can. Two-currency Expert Advisor,
If trade conditions are the same, then trade in the first currency is opened.
How to write the "If the order is opened in the first currency OP_BUY, then open a deal in the second OP_SELL
here is an example
if(OrdersTotal()== 1 ) // with this line for 2 currencies opens both BUY and SELL or 2 SELL orders
if ( currenttype == OP_BUY ) // it doesn't open at all
if ( currentticket == 1) // it doesn't open like this either.
secondticket = OrderSend("GBPUSD", OP_SELL, Lots, MarketInfo("GBPUSD", MODE_BID), 2, 0, 0, 0, WindowExpertName(), 0, 0, Red); //Order for 2 currencies
if ( c - d > a) // if trade condition is matched, Order for 1currency opens perfectly.
currentticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0, "macd sample",Magic,0,Green); //Order on 1currency
Help who can. Two-currency Expert Advisor,
If trade conditions are the same, then trade in the first currency is opened.
How to write the "If the order is opened in the first currency OP_BUY, then open a deal in the second OP_SELL
here is an example
if (OrdersTotal()== 1 ) // with this line for 2 currencies opens both BUY and SELL or 2 SELL orders
if ( currenttype == OP_BUY ) // it doesn't open at all
if ( currentticket == 1) // it doesn't open like this either.
secondticket = OrderSend("GBPUSD", OP_SELL, Lots, MarketInfo("GBPUSD", MODE_BID), 2, 0, 0, 0, WindowExpertName(), 0, 0, Red); //Order for 2 currencies
if ( c - d > a) // if trade condition is matched, Order for 1currency opens perfectly.
currentticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0, "macd sample",Magic,0,Green); //Order on 1currency