Luca Cerquatelli / Publications
Codes
Take Profit based on current profit for MetaTrader 4
Many Expert Advisors (EAs) tend to close orders at the take profit level, considering the pip distance from the purchase price
Take Profit based on your current profit for MetaTrader 4
Most EAs tend to close orders in take profit based on the distance in pips from the purchase price. However, this MQL4 code is based mainly on the current profit
Forum
Problem with boolean operation on price
double first_order_price = Ask; // store the price of previous order // Open 2st long position with smaller price if (Ask < (first_order_price - 10 * Point )) { ticket2 = OrderSend ( Symbol (), OP_BUY, lot_size, Ask, 0 , stop_loss, take_profit, "Test" , MagicNumber, 0 , Lime); } Why
Problem with "OrderModify error 4108" on OrderModify function
I'm asking for help with this error in my expert advisor's code: Failed to modify stop loss for short position (ticket #1). Error code : 4108. "OrderModify error 4108" I hope someone can help me, thanks. Here is the part of the code that returns the error: if (is_short_position && ticket > 0 &&
Manual selection of best Data Center in MT4
Hi, Since build 482 the ability of choosing your Data Center manually has been removed. I know that a lot of people messed up by choosing unsuitable Data Centers for themselves and flooding other with requests. However, I have noticed that the automatic selection of my terminal isnt correct with