I can use the following function to do so if the symbol is like USD/xxx. double dblVolumn = AccountFreeMargin ()*0.05*AccountLeverage()/100000; But the function doesn't work for symbols like xxx/USD or xxx/yyy. Apparently I should convert it using
Dear all, As stated in the subject, since my EA constantly checks the price for each order to see if the order should be closed, the take profit and stop loss parameters seem unnecessary, but when I use the function SendOrder, I have to specify the
Hi, All, I am tring to retrieving the bollinger bands of EURUSD using the following code. I suppose the following code can retrieve the upper and lower bands of the bollinger bands. However when I run the code, the two values return the same. Anyone
I have a program written in VB.NET that can generate buy/sell signal , but I don't know how to SECURELY transfer these information into the trade platform using MQL4. For the time being, I can ask the VB.NET program to write these signals into a TXT
Please see the example below. I opened a BUY order of 80 lots (I know it's a crazy size. I just want to amplify the calc) for USDCHF at 1.16783 and the current price is 1.16753. It shows my current profit is -2055.62. 1. How did come up with
Hi, I want to close an order either BUY or SELL at current price, but I use the following function in vain. Please help. OrderClose (OrderTicket(),OrderLots(),Ask,3,CLR_NONE); // This is for SELL orders
Since generally I set a target for an open position, there is no way I can be notified if the order reaches the TP or ST. Is there a way to generate an event triggered when the order reaches the TP or ST? Thanks
I want to routinely run a check function . However I found to use the start() in the EA is too frequent. I want to run this check function say every 1 min. Does it possible to define one? Thanks
I have been able to use OrderModify to modify a pending order, but I don't know how to set the parameter for Price for an opened order. Apparently I cannot modify the Price value since the order has been opened. According to the Documentation, I
int ticket = OrderSend ("EURUSD",OP_BUYSTOP,1,1.20000000,3,1.10000000,1.60000000,"Open Buy",0,0,Green); I used code above to try to place a BUYSTOP order, but I got a 130 error which means "Invalid stops". I don't know