Forum

op_buy, op_buy_limit, op_buy_stop, what's the different and flow?

I just found out about op_buy_limit and op_buy_stop. In my current understanding op_buy_limit and op_buy_stop fall under pending order , but it is listed as position that I have when I iterated OrdersTotal(). So this make me confuse about mechanic behind it. If I want to find out, just opened

Is there any difference between MT4 and MT5 historical data?

While I do recognize, MT5 have superior backtest module but is there any difference between MT4 and MT5 historical data

Does socket work in tester?

I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation ( https://www.mql5.com/en/docs/network/socketconnect ), it cannot be called from an indicator, I've made it as an

Socket Programming syntax not recognize

I'm try to exchange data using socket. I try to follow the example from this documentation https://www.mql5.com/en/docs/network/socketconnect, but socket command are not recognized by MQL. Is there any include or something that I missed

Clarification for profit values in report

Can I ask for clarification what does profit calculate? Why are the value varies, when I hard code tp for 55 pip and sl for 45 pip? Why does there are 5 point different (55 -> 50 & 45 -> 50)

Backtesting keep throwing Order Send Error 130 / 138

I try to back test my expert advisor, but it keep sending error 130 / 138, very rarely it goes thru. I read somewhere that I can't use predetermined variable for backtest, I already try to change all the predetermined variable. Is something else piploss = pipgain = 0.03 double price = iClose (

ontick event and period

I've been reading mql4 documentation, but I still don't understand this well. If I set the period to one hour, does ontick event run every second as the name tick indicate or does ontick even run every hour as I set in the period? Sorry for the stupid question, I'm not really good at this

OrderSend error 138 only in tester, not in live demo

I've got OrderSend 138 only if I run it in tester, not in live demo. I've try to adjust slippage point to no avail. Anyone get any idea why this happen? double price = iClose ( Symbol (), PERIOD_H1 , 1 ); if (up > down && up > sideway){ double stoploss = NormalizeDouble (price-piploss* Point