The utility creates pending orders for trading a selected asset, saving their quotes. If an order is closed, it reopens at the same quotes that were originally set.
The utility (hereinafter referred to as the bot) helps automatically or manually place buy or sell orders when the price reaches certain levels. This is convenient for traders who need to fix a price range without constantly monitoring the chart.
How it works:
Creates "buy stop," "sell stop," "buy limit," and "sell limit" orders—orders that are activated when the price reaches a certain level.
The levels for these orders are set either automatically (from the current price with a specified distance) or manually using parameters.
Stop-loss (SL) and take-profit (TP) levels are set for each order to automatically limit losses and lock in profits.
It controls the number of open positions and prevents them from exceeding the specified limit.
If the user doesn't specify a specific price for the order, an automatic price is set with a certain "distance" in points from the current market price.
Important:
If the quote is set to -1.0, the order is not created.
If the quote is set to 0, the order will be opened automatically based on the current price; the distance will depend on the specified parameter.
Settings:
- Lot size (the same for all trades).
- Distance from the current price for pending orders.
- SL and TP levels.
- Limit on the number of open positions (if two active positions are open, the bot will not place new orders unless 2 is specified in the parameters).
- Order reopening time (I recommend leaving it at 1).
Example of how to use it:
In screenshot 1, we have two pending orders, separated by 200 points and with the same SL of 100 points.
The trading philosophy is that the price is not static. The following scenario could occur: for example, the price hits the SL three times, resulting in a loss of 300 pips, then drops to 700 pips. The profit is 400 pips. The block is designed to break out of the range.
Regardless of where the price goes, we remain in the black, as shown in screenshot 2 (the main thing is to compensate for losses).
There are many variations of block creation. Instead of a 100-pip SL as in screenshot 1, you can set a 100-pip TP inside the block, thereby allowing for good profits within consolidations.
Overall:
This bot automatically places pending orders with preset conditions, allowing a trader to follow their strategy without constant intervention.
By running the bot on the server for a medium period, you can accumulate a large number of pips without monitoring the chart!
If you have any ideas for improving the bot, please share yours!