Hello everyone, on the Market (https://o-s-a.net/market/products ) added the free robot.
An example of a multithreading-based robot. There are no events to subscribe to, there is the launch of a second thread to track states.
Entering the position - we are waiting for a sharp deviation of the price by the specified number of percent from the edge of the glass.
Exit a position when the price rolls back by 50 percent or more of the entry price, i.e. if the price has returned by half or more of the initial movement.
1. Mode. On - enabled. Off - disabled; Only Long - enter only long; Only Short - enter only short; Only Close Position - close positions.
2. The volume is fixed - the number of lots to enter.
3. Slippage in % - the amount of slippage as a percentage of the last price. (E.g. The last price = 90, Slippage = 1%, so the amount of slippage will be 90 * 1 / 100 = 0,9).
4. The period for which the sma is calculated.
5. The lifetime of the order, sets the time after which to rearrange the order.
6. The price deviation from the edge of the glass in %.
7. Number of decimal places, price rounding.
You can download the indicator here: https://o-s-a.net/market/item/22
Download, use, successful algorithms!