Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
Always post all relevant code (using Code button) or attach the source file.
What does the log files say?
if (BUY_SEL == "BUY") { lotSize = (AccountBalance()*riskPercentage/100)/(SL_distance*10); stopLoss = Ask-SL_distance*0.0001; takeProfit = Ask+SL_distance*Ratio*0.0001; ticket = OrderSend(_Symbol, OP_BUY, lotSize, Ask, 100, stopLoss, takeProfit, NULL, 12345); magic=12345; } else if (BUY_SEL == "SEL") { lotSize = (AccountBalance()*riskPercentage/100)/(SL_distance*10); stopLoss = Bid+SL_distance*0.0001; takeProfit = Bid-SL_distance*Ratio*0.0001; ticket = OrderSend(_Symbol, OP_SELL, lotSize, Bid, 100, stopLoss, takeProfit, NULL, 12345); magic=12345; }
Explanation from the developer: Program works by tracking a chart in external program and sending a signal through txt document. Expert in meta trader reads said file from common terminal folder and saves its content in a string variable. That part of the program works, expert opens, reads, and closes the file normally. Based on that signal, expert must enter buy or sell order with conditions set by the client which are not relevant for the working of the expert. Buy orders are always executed as intended. Sell orders don't work but only on client's computer regardless of account or broker used. On computer on which the expert was developed and tested everything works. Settings on client's computer are set correctly, both long and short positions are allowed and DLL inputs are not required. Section of code that governs sending orders is attached below and is located in OnTick void function.
ticket = OrderSend(_Symbol, OP_BUY, lotSize, Ask, 100, stopLoss, takeProfit, NULL, 12345);
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an expert that executes orders based on external inputs from text file. Expert reads the file as intended and sends buy orders. However, sell orders don't work. What could be the problem? Auto trading is on and is set to both long and short.
Important to say: expert advisor works normally on a different computer with a different account.
Manual trades work normally.