New article MQL5 Wizard: How to Teach an EA to Open Pending Orders at Any Price has been published:
The article describes a method of modifying the code of a trading signal module for the implementation of the functionality allowing you to set pending orders at any distance from the current price: it may be the Close or Open price of the previous bar or the value of the moving average. There are plenty of options. Important is that you can set any opening price for a pending order. This article will be useful to traders who trade with pending orders.
An Expert Advisor generated using the
MQL5 Wizard can only open pending orders at the fixed distance from the
current price. This means that if the market situation changes (e.g. a
change in market volatility), the Expert Advisor will have to be run
again with new parameters.
This would not be suitable for many
trading systems. In most cases, the price level for pending orders is
determined dynamically by a trading system. And the distance from the
current price is constantly changing. In this article, we will discuss
how to modify an Expert Advisor generated using the MQL5 Wizard so that
it can open pending orders at varying distances from the current price.
Author: Karputov Vladimir
thanks for your code. it's very helpful.
by the way, i am
trying to run the code, the result include buy and sell in different
prices, but the profit column is always ZERO, even there are some deals.
this happens with different symbols and times.
your help is much appreciated.