Your trailing profit works well. Thanks.
Thanks for the tip.
And what program is it about? :)
The script exposes the grid of pending orders ...
According to the plan, the script should place pending orders up and down from the price.
The more I write, the more doubts: "Maybe you need two separate scripts? One for placing pending orders UP from the current price, and the second for placing pending orders DOWN from the current price?".
I think - it should be one script because it is related to the distance from the pending order price to the market price (to be same in 'buy stop order price/market price distance' and 'sell stop order price/market price distance').This script may be usefull to trade the news events for example.Example:
OrdersNumber = 2 // Number of pending orders for each side
PendingGaps = 15 // Gap for pending orders from the current price in pips
StepOrders = 10 // Step between orders in pips
Initial Stop = 100 // Initial stop in pips
TakeProfit = 50 // Take profit in pips
Setting pending orders as quickly as possible: the mode CTrade::SetAsyncMode.
Due to the asynchronous mode, the scripts Pending orders UP and Pending orders DOWN display five orders (the time from the sending of the first trade order to the confirmation of the last pending order placement) for the time from 70 to 80 milliseconds!
There are many indicators and each has its own signals. But at the same time processing of alerts and sending alerts is a repeating algorithm, I think it will be better if you split the functional:
I didn't understand your last EA which is using M!,M5 and H1 i-Regr indicator. Could you visualize buy/sell points?