Forum

Bid, ask, other

Hi, when putting a buy stop order I'm in doubt about this situation: I want the stop price to be High[1] + 1 (one pip). What I don't know is which price does High[1] give: is it the bid, the ask, the average between the two, or other? The same thing for going short: Low[1] -1 (one pip). Which price

expiration for pending order

Hi, I want to place a pending order that will expire within 5 minutes (from the placement of the stop order). Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lot,StopPrice,Slippage,0,0," OrderSend function ",0001,here I must put the expiration,Blue); // Order send I'm having difficulties with how to fill the

OS for MT4

Hello, Can MT4 run on these three OS: Windows 2003 32-bit Web Windows 2003 32-bit Standard Windows 2003 64-bit Standard ? What about CentOS? Thanks

Stop Loss: low of a bar, or tighter?

Hello, This question is not about a specific problem writing mql4 code. It's about knowing what works best for an EA. Suppose I'm going long, I wonder where's best to put the SL, choosing between the low of the last closed bar, or the middle of the last closed bar (in this case the stop would be

Where to put the Stop Loss

Hello, Suppose I'm going long, does anyone know where's best to put the SL, choosing between the low of the last closed bar, or the middle of the last closed bar (in this case the stop would be tighter)? Thanks

OrderModify

Hello: I have this in my code: // Returns result and error messages void PrintMessageOrderModify (bool ticket) { int check ; check=GetLastError(); if(ticket>=0) Print("An order has been successfully placed with ticket # ",ticket,"."); // request is completed or order is placed if(ticket<0)

OrderModify

Hello, I wrote this: TicketModify = OrderModify(OrderTicket(),OpenPrice,StopLoss,0,0,Blue); // Order modify // Returns result and error messages void PrintMessageOrderModify (bool ticket) { int check; check=GetLastError(); if(ticket) Print("An order has been successfully placed with ticket #

Expiration for OrderSend

Hello, I'm trying to code a buystop order , and I want to set expiration as open time of current bar plus 120 seconds. I tried,Time[0] + 120, in the expiration field, but it yiels invalid trade parameters error. Does anyone know how to get it right? Thanks

Use of RefreshRates

Hello, In mql5 there's the CopyRates function to get the latest rates. In mql4 there's no such a function, but there's RefreshRates(). The question is: How often should it be called? Right before calling OrderSend() or OrderModify(), for example? Or it's necessary only after there's a pause, such as